Hello,
I have a problem with filtering a layer, when filter value contains a single quote (which I replace with two single quotes – according to a specification: https://docs.geoserver.org/stable/en/user/filter/ecql_reference.html#ecql-literal).
Values are filtered correctly when there are some results. If the result should be empty layer – I get following exception in the response:
<?xml version="1.0" encoding="UTF-8"?>Could not parse CQL filter list.
Encountered "ongnam" at line 1, column 115.
Was expecting one of:
"and" …
"or" …
")" …
"/" …
"*" …
"+" …
"-" …
Parsing : (1 = 1) AND (1 = 1 AND (region = 'JAPAC') AND (country = 'South Korea') AND (state = 'Chungcheongnamdo [Ch''ungch'ongnam-do]')).
And here is a request that I send:
https://abbvie-ows.omnilocation-iot.com/geoserver/abbvie/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=asset_site&TILED=true&CQL_FILTER=(1%20%3D%201)%20AND%20(1%20%3D%201%20AND%20(region%20%3D%20'JAPAC')%20AND%20(country%20%3D%20'South%20Korea')%20AND%20(state%20%3D%20'Chungcheongnamdo%20[Ch''ungch'ongnam-do]'))&TIME_=1583319334693&viewparams=&WIDTH=512&HEIGHT=512&CRS=EPSG%3A3857&STYLES=&BBOX=10018754.17139462%2C5009377.085697312%2C15028131.257091932%2C10018754.171394624
If there is at least one result (on the whole layer), I get a correct image as a response. Here is a sample request that works fine:
https://abbvie-ows.omnilocation-iot.com/geoserver/abbvie/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=asset_site&TILED=true&CQL_FILTER=(1%20%3D%201)%20AND%20(1%20%3D%201%20AND%20(region%20%3D%20'JAPAC')%20AND%20(country%20%3D%20'South%20Korea')%20AND%20(state%20%3D%20'Daegu%20Gwang''yeogsi%20[Taegu-Kwangyokshi]'))&TIME_=1583320599330&viewparams=&WIDTH=512&HEIGHT=512&CRS=EPSG%3A3857&STYLES=&BBOX=10018754.17139462%2C0%2C15028131.257091932%2C5009377.085697311
Any ideas, how could I configure my filter, so it works in all cases?
Best Regards
Martyna Kolaczek