Skip to content
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

WMS:GetFeatureInfo, encoding of gml:name #5361

foggel opened this issue Dec 21, 2016 · 1 comment


None yet
2 participants
Copy link

commented Dec 21, 2016

gml output from WMS:GetFeatureInfo is invalid if the wms_title of a layer contains "&".


  NAME "layer1"
    "wms_title" "this & that"



<?xml version="1.0" encoding="UTF-8"?>

        <gml:name>this & that</gml:name>

The <gml:name> element in the result is in plain text: <gml:name>this & that</gml:name> but it should be xml encoded <gml:name>this &amp; that</gml:name>

Since the output is not valid gml, clients like QGIS will fail to consume the result. In the case of QGIS the end user will see "No features found".

I think the problem is in mapgml.c:1458 where msOWSPrintMetadata() should be changed to msOWSPrintEncodeMetadata()

@foggel foggel changed the title GetFeatureInfo, gml:name encoding WMS:GetFeatureInfo, encoding of gml:name Dec 24, 2016

ravhed added a commit to ravhed/mapserver that referenced this issue Apr 18, 2019

sdlime added a commit that referenced this issue Apr 18, 2019

Merge pull request #5793 from ravhed/wms-getfeatureinfo-encoding
GML:Name is now encoded in WMS GetFeatureInfo (fixes #5361)

This comment has been minimized.

Copy link

commented Apr 18, 2019

An old one that should have been fixed long ago. Closing now though... --Steve

@sdlime sdlime closed this Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.