Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save livercake/e9d340176c220cc18129fc2950c87c01 to your computer and use it in GitHub Desktop.
Save livercake/e9d340176c220cc18129fc2950c87c01 to your computer and use it in GitHub Desktop.
escaping entities
<![CDATA[
Within this Character Data block I can
use double dashes as much as I want (along with <, &, ', and ")
*and* %MyParamEntity; will be expanded to the text
"Has been expanded" ... however, I can't use
the CEND sequence (if I need to use it I must escape one of the
brackets or the greater-than sign).
]]>
<!--
Within this comment I can use ]]>
and other reserved characters like <
&, ', and ", but %MyParamEntity; will not be expanded
(if I retrieve the text of this node it will contain
%MyParamEntity; and not "Has been expanded")
and I can't place two dashes next to each other.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment