SQL Escape / Unescape

Escapes or unescapes a SQL string removing traces of offending characters that could prevent execution.

The following rules are applied:

  • Escapes all single quote characters by doubling them. Ex: select * from table where value = 'a single quote '' is offensive';