Convert input text to various representations and escaping levels.
Also related: Text Escaping and Unescaping in JavaScript.