cdata_section(content) public

Returns a CDATA section with the given content. CDATA sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string <![CDATA[ and end with (and may not contain) the string ]]>.

cdata_section("<hello world>")
# => <![CDATA[<hello world>]]>

# => <![CDATA[<hello from a text file]]>

# => <![CDATA[hello]]]]><![CDATA[>world]]>
Show source
Register or log in to add new notes.