Do you hate the hassle of escaping quotes, newlines, etc. in strings?
Just let this script do it for you!!! You can choose to use Unicode or standard escapes as well as the option of replacing HTML characters with their corresponding entities (e.g. < to &lt;).


Unicode String (Hexidecimal Escapes):
JavaScript String (Simple Escapes):
Escape HTML first:
   

This function is provided by Joseph K. Myers. (View Source)