AW: [mapserver-users] getFeatureInfo html with special characters indatasource

Arnd Wippermann arnd.wippermann at web.de
Fri Sep 9 07:25:25 EDT 2011


Hi,

Perhaps you can use [yourFIELD_raw]. It shouldn't encode HTML.

http://mapserver.org/mapfile/template.html
[attribute name],[attrribute name_esc],[attribute item name_raw]


Or you can use javascript in your templates to solve this

<!-- Mapserver Template -->
<script>
var ret = "[yourFIELD]".split(" ").join("<br>");
document.write(ret);
</script>
 
Arnd

-----Ursprüngliche Nachricht-----
Von: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Jörg Thomsen
Gesendet: Freitag, 9. September 2011 12:01
An: mapserver-users at lists.osgeo.org
Betreff: [mapserver-users] getFeatureInfo html with special characters
indatasource

hi,

I'd like to get a html-feature-info like

Niedersachsen
167

I get both, 'Niedersachsen' and '167' from the same table-column of the
database and I need the line break between them. When I use
'Niedersachsen<br>167' in the Atrributes, mapserver changes the brackets
into the html-entities and i get 'Niedersachsen&lt;br&gt;167'
which is shown as 'Niedersachsen<br>167' in the browser-window.

Are there any special-characters I can use in the database or is there an
other solution?

Jörg
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list