jpmonette / q

A Dynamic SOQL Query Builder for the Force.com Platform ☁️
MIT License
49 stars 25 forks source link

Escape backslash #28

Open DimiT opened 5 years ago

DimiT commented 5 years ago

There are case when there are "\" symbols in where clause which breaks correct SOQL query.

e.g. (select id from account where name = '\'somevalue')

In that case query which will be produced by String.escapeSingleQuotes will only escape single quote symbol but not "\". Therefore query which will be produced will be as "select id from account where name ='\\'somevalue'" and this SOQL query will be incorrect.

jpmonette commented 5 years ago

@DimiT Good catch! Mind working on a PR to fix this? :)

DimiT commented 5 years ago

Unforunately I'm not an Apex developer.