August 2003
Intermediate to advanced
1140 pages
68h 45m
English
JSStringFormat
JSStringFormat(string)Returns string with special characters
escaped so that it is safe to use in JavaScript statements. Example:
<cfset MyString="""Escape double quotes"". Escape the \ character. 'Escape single quotes'"> <cfset SafeString=JSStringFormat(MyString)> <cfoutput> <b>Original String:</b> #MyString#<br> <b>JavaScript Safe String:</b> #SafeString# </cfoutput>