quoteRaw function

String quoteRaw(
  1. String text
)

Escape angle brackets and CDATA openers.

Implementation

String quoteRaw(String text) {
	// escape and return
	return text.replaceAll("<", "\\<").replaceAll(">", "\\>").replaceAll("[!CDATA]", "\\[!CDATA]");
}