JSStringFormat

Escapes special JavaScript characters, such as single quotation mark, double quotation mark, and newline

JSStringFormat( string )

Returns: String

Argument Description
string
string, required

A string or a variable that contains one.

Examples

str = "Bob's comment was ""CFML rocks!""";
writeOutput(str & "<br />");
writeOutput(JSStringFormat(str));

See also