[Mapbender-commits] r9949 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Aug 21 02:41:56 PDT 2018


Author: armin11
Date: 2018-08-21 02:41:56 -0700 (Tue, 21 Aug 2018)
New Revision: 9949

Modified:
   trunk/mapbender/http/php/mod_wmc2ol.php
Log:
Fix of the openlayers export handler for wms layers which have " or ' in their layer titles

Modified: trunk/mapbender/http/php/mod_wmc2ol.php
===================================================================
--- trunk/mapbender/http/php/mod_wmc2ol.php	2018-08-21 08:07:40 UTC (rev 9948)
+++ trunk/mapbender/http/php/mod_wmc2ol.php	2018-08-21 09:41:56 UTC (rev 9949)
@@ -380,7 +380,7 @@
 			}
 		}
 		$i = $firstLayerId;
-		$html.="	layer0 = new OpenLayers.Layer.WMS( \"".$xml->LayerList->Layer[$i]->Title."\",\n";
+		$html.="	layer0 = new OpenLayers.Layer.WMS( \"".str_replace("'","",str_replace('"','',$xml->LayerList->Layer[$i]->Title))."\",\n";
 		$extensions=$xml->LayerList->Layer[$i]->Extension->children('http://www.mapbender.org/context');
 		$layer_id=dom_import_simplexml($extensions->layer_id)->nodeValue;
 		$layer_name=$xml->LayerList->Layer[$i]->Name;



More information about the Mapbender_commits mailing list