Escapes the JavaScript special characters in the text.
The text to be escaped.
Returns the text with escaped JavaScript special characters.