jsquote

Description:

Escape characters to allow use of the input value in a quoted Javascript string.

Input:

String to escape.

Return:

The input string with important characters escaped.