Add-Ons

Details

XML Encode 1.2 first_party

Author:
Rick Ellis
Published:
Mar 09, 2004
Last Updated:
Dec 01, 2008
License:
First Party License
Categories:
Plugins  Text Formatting  
XML Encoding plugin. Converts reserved XML characters into entities. This plugin is required for RSS feeds.

Example Usage

{exp:xml_encode}

text you want processed

{
/exp:xml_encode} 

Notes

This plugin converts reserved XML characters to entities. It is used in the RSS templates.

To use this plugin, wrap anything you want to be processed by it between these tag pairs:

{exp:xml_encode}

text you want processed

{
/exp:xml_encode} 


Note: Because quotes are converted into " by this plugin, you cannot use
ExpressionEngine conditionals inside of this plugin tag.

If you have existing entities in the text that you do not wish to be converted, you may use
the parameter protect_entities="yes", e.g.:

{exp:xml_encode}Text &ampEntities{/exp:xml_encode} 


results in: Text & Entities

{exp:xml_encode protect_entities="yes"}Text &ampEntities{/exp:xml_encode} 


results in: Text & Entities