Escape search value

This commit is contained in:
Georgy Litvinov 2020-08-21 09:47:03 +02:00
parent 894b51ee23
commit 01c227f652

View file

@ -85,7 +85,7 @@
if ('operator' in json_query && json_query.operator.startsWith("not_")){
string_query += "NOT ";
}
string_query += json_query.field + ":\'" + json_query.value.toString().replace(/['"]+/g, '') + "\'";
string_query += json_query.field + ":\'" + escape(json_query.value.toString().replace(/['"]+/g, '')) + "\'";
}
return string_query;
}