Movable Type Documentation > Appendices > Appendix: Template Tag Modifiers

encode_xml

Type: modifier

With a value of "1" encodes into entities any characters that XML requires to be encoded. These are: &, ", <, and >.

The difference between this and encode_html is that the latter encodes a much wider set of special characters into HTML entities if you have the HTML::Entities module installed and you have not turned on the NoHTMLEntities option in mt-config.cgi.

By default encode_xml will encapsulate content in a CDATA block if it detects the string to have any HTML content or any HTML entities. If the NoCDATA configuration directive is used, this behavior will be turned off.

Example

<mt:tagname encode_xml="1" />

See Also:

This page was last updated on 2007-09-04, 11:19.  

Submit a User Contributed Note

User contributed notes are a great way to share the knowledge you have gained in using Movable Type.

If you have a technical question or problem, please visit Movable Type Support.

(If you haven't left a note here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)