Similar to the
encode_* modifiers. The input is reformatted so that certain special characters are translated depending on the value of the
escape attribute. There are two primary differences between “encode” and “escape”:
Usage: The “encode” modifiers use the “1” style — where you specify the tag as
encode*="1"(for instance). With the
escapemodifier you instead specify
escape="js", for example.
The more important difference is the result: the
encode_*modifiers will encode just about every character — spaces turn into
%20and you often get a mess if you want to read the result. For most uses, you’re probably more likely to use
html: Similar to the
encode_htmlmodifier. Escapes special characters as HTML entities.
url: Similar to the
encode_urlmodifier. Escapes special characters using a URL-encoded format (ie, “ ” becomes “%20”).
js: Similar to the
escape modifier can also be used multiple times:
<mt:EntryTitle escape="html" escape="js">