svn commit: r941 - trunk/mapbender/http/classes/class_wmc.php

christoph at osgeo.org christoph at osgeo.org
Thu Nov 23 07:47:02 EST 2006


Author: christoph
Date: 2006-11-23 12:47:02+0000
New Revision: 941

Modified:
   trunk/mapbender/http/classes/class_wmc.php

Log:
added html_entity_decode when parsing XML

Modified: trunk/mapbender/http/classes/class_wmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/classes/class_wmc.php?view=diff&rev=941&p1=trunk/mapbender/http/classes/class_wmc.php&p2=trunk/mapbender/http/classes/class_wmc.php&r1=940&r2=941
==============================================================================
--- trunk/mapbender/http/classes/class_wmc.php	(original)
+++ trunk/mapbender/http/classes/class_wmc.php	2006-11-23 12:47:02+0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: class_wmc.php 519 2006-11-21 15:33:24Z christoph $
+# $Id: class_wmc.php 566 2006-11-23 12:14:13Z christoph $
 # http://www.mapbender.org/index.php/class_wmc.php
 # Copyright (C) 2002 CCGIS 
 #
@@ -194,20 +194,20 @@
 						$this->wmc_bBox_maxy = $element[attributes]["maxy"];
 				}
 				if(strtoupper($element[tag]) == "NAME"){
-						$this->wmc_name = mb_utf8_decode($element[value]);
+						$this->wmc_name = mb_utf8_decode(html_entity_decode($element[value]));
 				}
 				if(strtoupper($element[tag]) == "TITLE"){
-						$this->wmc_title = mb_utf8_decode($element[value]);
+						$this->wmc_title = mb_utf8_decode(html_entity_decode($element[value]));
 				}
 				if(strtoupper($element[tag]) == "ABSTRACT"){
-						$this->wmc_abstract = mb_utf8_decode($element[value]);
+						$this->wmc_abstract = mb_utf8_decode(html_entity_decode($element[value]));
 				}
 				if(strtoupper($element[tag]) == "CONTACTINFORMATION" && $element['type'] == "open"){
 						$contactinformation = true;
 				}
 				if ($contactinformation) {
 					if(strtoupper($element[tag]) == "CONTACTPOSITION"){
-							$this->wmc_contactposition = mb_utf8_decode($element[value]);
+							$this->wmc_contactposition = mb_utf8_decode(html_entity_decode($element[value]));
 					}
 					if(strtoupper($element[tag]) == "CONTACTVOICETELEPHONE"){
 							$this->wmc_contactvoicetelephone = $element[value];
@@ -216,17 +216,17 @@
 							$this->wmc_contactfacsimiletelephone = $element[value];
 					}
 					if(strtoupper($element[tag]) == "CONTACTELECTRONICMAILADDRESS"){
-							$this->wmc_contactemail = mb_utf8_decode($element[value]);
+							$this->wmc_contactemail = mb_utf8_decode(html_entity_decode($element[value]));
 					}
 					if(strtoupper($element[tag]) == "CONTACTPERSONPRIMARY" && $element['type'] == "open"){
 							$contactpersonprimary = true;
 					}
 					if ($contactpersonprimary) {
 						if(strtoupper($element[tag]) == "CONTACTPERSON"){
-								$this->wmc_contactperson = mb_utf8_decode($element[value]);
+								$this->wmc_contactperson = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "CONTACTORGANIZATION"){
-								$this->wmc_contactorganization = mb_utf8_decode($element[value]);
+								$this->wmc_contactorganization = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "CONTACTPERSONPRIMARY" && $element['type'] == "close"){
 								$contactpersonprimary = false;
@@ -237,22 +237,22 @@
 					}
 					if ($contactaddress) {
 						if(strtoupper($element[tag]) == "ADDRESSTYPE"){
-								$this->wmc_contactaddresstype = mb_utf8_decode($element[value]);
+								$this->wmc_contactaddresstype = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "ADDRESS"){
-								$this->wmc_contactaddress = mb_utf8_decode($element[value]);
+								$this->wmc_contactaddress = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "CITY"){
-								$this->wmc_contactcity = mb_utf8_decode($element[value]);
+								$this->wmc_contactcity = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "STATEORPROVINCE"){
-								$this->wmc_contactstateorprovince = mb_utf8_decode($element[value]);
+								$this->wmc_contactstateorprovince = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "POSTCODE"){
 								$this->wmc_contactpostcode = $element[value];
 						}
 						if(strtoupper($element[tag]) == "COUNTRY"){
-								$this->wmc_contactcountry = mb_utf8_decode($element[value]);
+								$this->wmc_contactcountry = mb_utf8_decode(html_entity_decode($element[value]));
 						}
 						if(strtoupper($element[tag]) == "CONTACTADDRESS" && $element['type'] == "close"){
 								$contactaddress = false;
@@ -297,7 +297,7 @@
 					}
 					if(strtoupper($element[tag]) == "KEYWORD"){
 						$cnt_keyword++;
-						$this->wmc_keyword[$cnt_keyword] = mb_utf8_decode($element[value]);
+						$this->wmc_keyword[$cnt_keyword] = mb_utf8_decode(html_entity_decode($element[value]));
 					}
 				}
 						
@@ -368,12 +368,12 @@
 								 	$this->wmc_layer_style_sld_url[$cnt_layer][$cnt_style] = $element[attributes]["xlink:href"];
 								 }
 								 if(strtoupper($element[tag]) == "TITLE"){
-								 	$this->wmc_layer_style_sld_title[$cnt_layer][$cnt_style] = mb_utf8_decode($element[value]);
+								 	$this->wmc_layer_style_sld_title[$cnt_layer][$cnt_style] = mb_utf8_decode(html_entity_decode($element[value]));
 								 }
 							 }
 							 else {
 								 if(strtoupper($element[tag]) == "NAME"){
-								 	$this->wmc_layer_style_name[$cnt_layer][$cnt_style] = mb_utf8_decode($element[value]);
+								 	$this->wmc_layer_style_name[$cnt_layer][$cnt_style] = mb_utf8_decode(html_entity_decode($element[value]));
 								 }
 								 if(strtoupper($element[tag]) == "TITLE"){
 								 	$this->wmc_layer_style_title[$cnt_layer][$cnt_style] = $element[value];
@@ -404,7 +404,7 @@
 						 	 $server = true;
 						 	 $this->wmc_wms_service[$cnt_layer] = $element[attributes]["service"];
 						 	 $this->wmc_wms_version[$cnt_layer] = $element[attributes]["version"];
-						 	 $this->wmc_wms_title[$cnt_layer] = mb_utf8_decode($element[attributes]["title"]);
+						 	 $this->wmc_wms_title[$cnt_layer] = mb_utf8_decode(html_entity_decode($element[attributes]["title"]));
 						 }
 						 if ($server) {
 							 if(strtoupper($element[tag]) == "SERVER" && $element[type] == "close"){
@@ -415,13 +415,13 @@
 							 }
 						 }
 						 if(strtoupper($element[tag]) == "NAME"){
-					 		 $this->wmc_layer_name[$cnt_layer] = mb_utf8_decode($element[value]);
+					 		 $this->wmc_layer_name[$cnt_layer] = mb_utf8_decode(html_entity_decode($element[value]));
 						 }
 						 if(strtoupper($element[tag]) == "TITLE"){
-					 		 $this->wmc_layer_title[$cnt_layer] = mb_utf8_decode($element[value]);
+					 		 $this->wmc_layer_title[$cnt_layer] = mb_utf8_decode(html_entity_decode($element[value]));
 						 }
 						 if(strtoupper($element[tag]) == "ABSTRACT"){
-					 		 $this->wmc_layer_abstract[$cnt_layer] = mb_utf8_decode($element[value]);
+					 		 $this->wmc_layer_abstract[$cnt_layer] = mb_utf8_decode(html_entity_decode($element[value]));
 						 }
 						 if(strtoupper($element[tag]) == "SRS"){
 							 $epsgArray = explode(" ", $element[value]);						 	




More information about the Mapbender_commits mailing list