ExpressionEngine Docs

XML Encode

This plugin converts reserved XML characters to entities. It is useful in RSS and XML templates and as a custom field formatting option.

{exp:xml_encode}
    text you want processed
{/exp:xml_encode}

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

Parameters

protect_entities=

protect_entities="yes"

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 & Entities
{/exp:xml_encode}

results in Text & Entities

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

results in Text & Entities