Bug report #17725

Importing SLD : attributes names are not quoted in the expression

Added by Olivier Dalang about 7 years ago. Updated almost 6 years ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25621

Description

Hi,

When importing an SLD with some basic rules, attributes name are not quoted in the expression. This means that they can easily clash with keywords/function, and thus the expression will be invalid.

Example :

...
<ogc:Filter>
    <ogc:PropertyIsEqualTo>
        <ogc:PropertyName>boundary</ogc:PropertyName>
        <ogc:Literal>administrative</ogc:Literal>
    </ogc:PropertyIsEqualTo>
</ogc:Filter>
...

will generate the following rule:

boundary = 'administrative'

And since boundary is the name of a function, this makes an error (expecting "(")

Thanks !

History

#1 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Open to Feedback

Please check if this issue is still valid on QGIS 3.4.5 or 3.6.

Also available in: Atom PDF