JSStringFormat

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

Returns: string

Usage

JSStringFormat( string )

Arguments

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