Skip to content

[Bug]: generate HTML table in tooltip doesn't double the quote character #693

@jeremieprudhomme

Description

@jeremieprudhomme

What is the bug?

When clicking on the generate HTML button in the lizmap plugin > Layer > Popup, the generated HTML takes the fields aliases but doesn't double the quote character present in the aliases.

In result, the HTML is not correct as we can have for example :
[% with_variable( 'content', '<tr><th>Panneau d'information </th><td>' || "panneau_information" || '</td></tr>', if( "panneau_information" is not NULL or "panneau_information" <> '',@content,'') ) %]

The correct version should be :
[% with_variable( 'content', '<tr><th>Panneau d''information (PI Jaune)</th><td>' || "panneau_information" || '</td></tr>', if( "panneau_information" is not NULL or "panneau_information" <> '',@content,'') ) %]

Steps to reproduce :

  1. Set a layer attribute alias including a quote character in it
  2. Activate the popup in the lizmap plugin for this layer
  3. Click on generate HTML table
  4. Unchek the option to display the line if the value is empty or null
  5. In the HTML generated in the tooltip tab of the layer, the alias has a simple quote instead of a double quote.

Versions, safeguards, checks summary etc

Versions :

  • Lizmap Web Client : 3.9.5 - commit dfcab6880 3liz/lizmap-web-client@dfcab6880
  • Lizmap plugin : 4.5.7
  • QGIS Desktop : 3.40.14
  • Lizmap.com : Yes
  • QGIS Server : 3.40.14
  • Py-QGIS-Server : 1.9.6
  • QGIS Server plugin atlasprint : 3.4.3
  • QGIS Server plugin cadastre : 2.2.5
  • QGIS Server plugin lizmap_server : 2.14.1
  • QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* saas : 1.7.7 * webdav : 1.2.1
List of safeguards :
* Mode : safe
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions