Turn markup related characters into bracket notation.
Allowing markup characters in the phrase is problematic for a number of reasons, including:
Markup only makes sense in one context.
Their presence could unpredictably break markup or other syntax.
Translators are likely to unwittingly change/break markup unless you take extra precautions (e.g. more <ph> handling of text/html ctype in XLIFF, yikes!).
Markup could also make the translatable part harder for them to translate.
Allowing markup encourages using your phrase as a template/branding/theming system which is a really terrible idea.
if we don’t use them, even in chr() it is less problem prone since bracket notation allows to do things correctly in each context
So we detect and modify them.
… THIS FILTER Locale::Maketext::Utils::Phrase::Norm::Ampersand.
This is not enforced anywhere since we want to assume the coder knows what they are doing.
Turns <>'" into appropriate bracket notation.
& is handled in its own driver.
This is issued when " is encountered.
This is issued when ' is encountered.
To install Locale::Maketext::Utils, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locale::Maketext::Utils
CPAN shell
perl -MCPAN -e shell install Locale::Maketext::Utils
For more information on module installation, please visit the detailed CPAN module installation guide.