Open rphenriques opened 1 year ago
When using WMS layers with characters in names that need to be escaped in HTTP request, the legend does not display.
When using the layer https://sig.lneg.pt/server/rest/services/AtlasEolico/MapServer/10 the legend URL is https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Fluxo de potência incidente 20m [W/m2] which does not render unless it is escaped to https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Fluxo%20de%20pot%C3%AAncia%20incidente%2020m%20%5BW/m2%5D
this is not the case when using the layer ZZZZ on the same server. In this case the announced URL is https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Factor de forma de Weibull 20m and it displays correctly
The noticeable difference in the name is the use of the [ ] characters in the name of the layer that is not working. When this characters were escaped, the legend displays.
Active Python plugins DotMap | 0.2 quick_map_services | 0.19.33 ntv2_transformations | 0.20 pstimeseries | 0.3.1 postgis_geoprocessing | 0.9 downloadgeostatportugal | 0.2 Mergin | 2023.1 processing | 2.12.99 sagaprovider | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6
What is the bug or the crash?
When using WMS layers with characters in names that need to be escaped in HTTP request, the legend does not display.
Steps to reproduce the issue
When using the layer https://sig.lneg.pt/server/rest/services/AtlasEolico/MapServer/10 the legend URL is https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Fluxo de potência incidente 20m [W/m2] which does not render unless it is escaped to https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Fluxo%20de%20pot%C3%AAncia%20incidente%2020m%20%5BW/m2%5D
this is not the case when using the layer ZZZZ on the same server. In this case the announced URL is https://sig.lneg.pt/server/services/AtlasEolico/MapServer/WmsServer?request=GetLegendGraphic%26version=1.3.0%26format=image/png%26layer=Factor de forma de Weibull 20m and it displays correctly
The noticeable difference in the name is the use of the [ ] characters in the name of the layer that is not working. When this characters were escaped, the legend displays.
Versions
Active Python plugins DotMap | 0.2 quick_map_services | 0.19.33 ntv2_transformations | 0.20 pstimeseries | 0.3.1 postgis_geoprocessing | 0.9 downloadgeostatportugal | 0.2 Mergin | 2023.1 processing | 2.12.99 sagaprovider | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6