[Mapbender-commits] r3269 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Dec 2 06:14:22 EST 2008
Author: christoph
Date: 2008-12-02 06:14:22 -0500 (Tue, 02 Dec 2008)
New Revision: 3269
Modified:
trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/338
Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php 2008-12-02 10:51:59 UTC (rev 3268)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php 2008-12-02 11:14:22 UTC (rev 3269)
@@ -49,6 +49,15 @@
buttonDig_y.push(y);
}
+function htmlspecialchars(p_string) {
+ p_string = p_string.replace(/&/g, '&');
+ p_string = p_string.replace(/</g, '<');
+ p_string = p_string.replace(/>/g, '>');
+ p_string = p_string.replace(/"/g, '"');
+ // p_string = p_string.replace(/'/g, ''');
+ return p_string;
+};
+
//default definition of image directory for digitize buttons, might
//be overwritten with digitize conf data
var buttonDig_imgdir = "../img/button_digitize/";
@@ -1156,7 +1165,7 @@
if (d.get(i).count() > 1) {
multi = "multi";
}
- listOfGeom += ">" + geomName +" (" + multi + currentGeomType + ")</div>";
+ listOfGeom += ">" + htmlspecialchars(geomName) +" (" + multi + currentGeomType + ")</div>";
// multigeometries
listOfGeom += "<ul>";
More information about the Mapbender_commits
mailing list