Skip to content

unwrapCDATA

unwrapCDATA(string) → string · XML

Unwrap CDATA section if present, otherwise return the original string. See Chapter 22.

  • string (required): string that may be wrapped in <![CDATA[...]]>
utlx
unwrapCDATA("<![CDATA[Hello <World>]]>") // "Hello <World>"
unwrapCDATA("plain text")               // "plain text"

Released under AGPL-3.0.