escapeXML
Escapes special XML characters (<, >, &, ", ') in text without using CDATA. See Chapter 22.
text(required): string to escape
bash
echo '{"text": "price < 100 & qty > 0"}' | utlx -e 'escapeXML($input.text)'
# "price < 100 & qty > 0"utlx
{
safeText: escapeXML($input.userInput)
}