Skip to content

Commit 9bb00d2

Browse files
authored
Escape apostrophe in where clause (#504)
1 parent 559962b commit 9bb00d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ckanext/querytool/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def _create_where_clause(filters):
294294
for idx, _ in enumerate(filters):
295295
op = u'='
296296
name = _['name']
297-
value = _['value']
297+
value = _['value'].replace('\'', '\'\'')
298298

299299
if idx == 0:
300300
where_clause = u'WHERE ("{0}" {1} \'{2}\')'.format(

0 commit comments

Comments
 (0)