Not a developer? Go to MovableType.com

Documentation

escape

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 escape modifier 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 %20 and you often get a mess if you want to read the result. For most uses, you’re probably more likely to use escape.

Attributes

  • html: Similar to the encode_html modifier. Escapes special characters as HTML entities.
  • url: Similar to the encode_url modifier. Escapes special characters using a URL-encoded format (ie, “ ” becomes “%20”).
  • javascript or js: Similar to the encode_js modifier. Escapes special characters such as quotes, newline characters, etc., so that the input can be placed in a JavaScript string.
  • mail: A very simple email obfuscation technique.

Examples

<mt:EntryTitle escape="url">

The escape modifier can also be used multiple times:

<mt:EntryTitle escape="html" escape="js">
Back