[Mapbender-commits] r4442 - branches/2.6/http/include

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 29 09:03:26 EDT 2009


Author: christoph
Date: 2009-07-29 09:03:25 -0400 (Wed, 29 Jul 2009)
New Revision: 4442

Modified:
   branches/2.6/http/include/dyn_css.php
Log:


Modified: branches/2.6/http/include/dyn_css.php
===================================================================
--- branches/2.6/http/include/dyn_css.php	2009-07-29 11:40:09 UTC (rev 4441)
+++ branches/2.6/http/include/dyn_css.php	2009-07-29 13:03:25 UTC (rev 4442)
@@ -121,9 +121,17 @@
 		else {
 			echo "var ";
 		}
-		echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+		if (is_numeric(stripslashes($row["var_value"]))) {
+			echo $row["var_name"]." = ".stripslashes($row["var_value"]).";\n";
+		}
+		elseif (strpos(stripslashes($row["var_value"]), "[") === 0 || strpos(stripslashes($row["var_value"]), "{") === 0) {
+			echo $row["var_name"]." = ".stripslashes($row["var_value"]).";\n";
+		}
+		else {
+			echo $row["var_name"]." = '".str_replace(array('"',"'", "\r", "\n", "\0"), array('\"','\\\'','\r', '\n', '\0'), stripslashes($row["var_value"]))."';\n";
+		}
 	}
 	echo "// -->\n";
 	echo "</script>\n";
 }
- ?>
\ No newline at end of file
+ ?>



More information about the Mapbender_commits mailing list