[Mapbender-commits] r3270 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Dec 2 06:14:50 EST 2008
Author: christoph
Date: 2008-12-02 06:14:50 -0500 (Tue, 02 Dec 2008)
New Revision: 3270
Modified:
branches/2.5/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/338
Modified: branches/2.5/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_digitize_tab.php 2008-12-02 11:14:22 UTC (rev 3269)
+++ branches/2.5/http/javascripts/mod_digitize_tab.php 2008-12-02 11:14:50 UTC (rev 3270)
@@ -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;
+};
+
var buttonDig_imgdir = "../img/button_digitize/";
var buttonDig_id = [];
var buttonDig_on = [];
@@ -951,7 +960,7 @@
else if (d.get(i).geomType == parent.geomType.line) {geomName += " ("+msgObj.messageDescriptionLine+")";}
else if (d.get(i).geomType == parent.geomType.point) {geomName += " ("+msgObj.messageDescriptionPoint+")";}
- listOfGeom += ">" + geomName +"</div>\t\t</td>\n\t</tr>\n";
+ listOfGeom += ">" + htmlspecialchars(geomName) +"</div>\t\t</td>\n\t</tr>\n";
}
}
}
More information about the Mapbender_commits
mailing list