wrapIfNeeded
Automatically wrap content in CDATA if it contains enough special characters to benefit. See Chapter 22.
content(required): the text contentthreshold(optional): special char count thresholdtag(optional): wrapper format
utlx
wrapIfNeeded("<script>alert('hi')</script>")
// "<![CDATA[<script>alert('hi')</script>]]>"
wrapIfNeeded("plain text") // "plain text" (no wrapping needed)