-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLD - Missing escaped characters when converting OGC propertyIsLike to Regex #5658
Comments
SLD / Filter encoding: fix escaping of REGEX special characters (fixes #5658)
thanks @rouault ! |
Actually, the pr #5660 introduced a regression in regards to how the regexp is built / character are escaped, I reproduced using a shapefile to simplify ; using the following layer entry:
Here is the shape mentioned: surval.zip Calling mapserver using:
The SLD passed as parameter looking like: <ogc:Filter xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ogc:PropertyIsLike escapeChar="\" matchCase="false" singleChar="?" wildCard="*">
<ogc:PropertyName>SUPPORTS_N</ogc:PropertyName>
<ogc:Literal>*Support : Eau - Niveau : Surface-Fond ?profondeur <3 m?*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter> Breaking in gdb in the
After the PR:
the characters "-" and "<" are escaped. Normally in our SLD filter, we make use of parenthesis instead of the "?" char, which does not work in both version, so for now I was using '?' instead. From my understanding, I can sum up the 2 problems encountered here:
I have not been able to reopen the current issue, I can open a new one if necessary, and/or provide more information to ease reproduction of the problem. |
ping @rouault |
…is taken into account to avoid extent inconsistencies (found during refs MapServer#5658 investigation)
…is taken into account to avoid extent inconsistencies (found during refs MapServer#5658 investigation)
…is taken into account to avoid extent inconsistencies (found during refs MapServer#5658 investigation)
SLD / Filter encoding: fix again escaping of REGEX special characters (fixes #5658)
WMS: apply FILTER (RFC 118) vendor parameter after the CRS parameter is taken into account to avoid extent inconsistencies (found during refs #5658 investigation)
Using the following getmap request:
The SLD used as parameter above, containing a filter which has the following form (truncated XML content):
Mapserver will parse the SLD and generate a temporary mapfile to produce the actual output, this mapfile will translate the previous
PopertyIsLike
property into the following expression:The wildcard character (
*
) is correctly escaped (->.*
) as a REGEXP, but the parenthesis are not ((0-1m)
instead of\(0-1m\)
). The expected expression should have every REGEXP control characters escaped when generating the temporary mapfile.Note: The issue was encountered on a oracle spatial datasource but adapted to a shapefile source to simplify its reproduction. In case of an Oracle datasource, another part of the temporary mapfile might be affected by a similar issue, about the
FILTER
directive as below:The text was updated successfully, but these errors were encountered: