Prevents CFML from automatically escaping single quotation mark characters that are contained in a variable. CFML does not evaluate the argument.

preserveSingleQuotes(variable) → returns void

Discouraged: The use of preserveSingleQuotes often (but not always) results in code that will be vulnerable to SQL Injection. Use the cfqueryparam tag instead, and you will not need to worry about single quotes.

Argument Reference

variable string

Variable that contains a string in which to preserve single quotation marks.

Sample code invoking the preserveSingleQuotes function

Fork me on GitHub