[mapserver-users] getFeatureInfo html with special characters indatasource

Jörg Thomsen jt at mapmedia.de
Fri Sep 9 07:40:10 EDT 2011


hello Arne,

Am 09.09.2011 13:25, schrieb Arnd Wippermann:
> 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]

this works fine, thanks!

Jörg


>
> 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
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_________________________________________________

MapMedia
Kartographie und raumbezogene Informationssysteme

Gillweg 3, 14193 Berlin
fon: +49 30 89 06 82-70
fax: +49 30 89 09 53-21
mail: jt at mapmedia.de
net:  www.mapmedia.de
_________________________________________________



Geschäftsführer: G. v. Tschirnhaus, J. Thomsen, P. Stamm
Registergericht, Berlin - Amtsgericht Charlottenburg,
HRB 89625, Umsatzsteuer-Identnummer: DE 813794062


More information about the mapserver-users mailing list