[Mapbender-commits] r1281 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Apr 27 03:56:11 EDT 2007


Author: christoph
Date: 2007-04-27 03:56:10 -0400 (Fri, 27 Apr 2007)
New Revision: 1281

Modified:
   trunk/mapbender/http/javascripts/mod_savewmc.php
Log:
bug: json.

for with associative array



Modified: trunk/mapbender/http/javascripts/mod_savewmc.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_savewmc.php	2007-04-26 14:08:51 UTC (rev 1280)
+++ trunk/mapbender/http/javascripts/mod_savewmc.php	2007-04-27 07:56:10 UTC (rev 1281)
@@ -66,7 +66,12 @@
 	html[38]="&"; html[60]="<"; html[62]=">";
 	if(typ==1 || typ==3) html[39]="'";
 	if(typ==2 || typ==3) html[34]=""";
-	for(var i in html) eval("str=str.replace(/"+String.fromCharCode(i)+"/g,\""+html[i]+"\");");
+	for(var i in html) {
+		if (typeof(html[i]) != 'function') {
+			var functionString ="str=str.replace('"+String.fromCharCode(i)+"',\""+html[i]+"\");";
+			eval(functionString);
+		}
+	}
     return str;
 }
 function mod_savewmc(title){



More information about the Mapbender_commits mailing list