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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 22 04:34:34 EDT 2010


Author: tbaschetti
Date: 2010-07-22 08:34:34 +0000 (Thu, 22 Jul 2010)
New Revision: 6608

Modified:
   trunk/mapbender/http/php/mod_editGuiWms.php
   trunk/mapbender/http/php/mod_editWMS_Metadata.php
   trunk/mapbender/http/php/mod_loadCapabilitiesList.php
Log:
quote wms_abstract
http://trac.osgeo.org/mapbender/ticket/662




Modified: trunk/mapbender/http/php/mod_editGuiWms.php
===================================================================
--- trunk/mapbender/http/php/mod_editGuiWms.php	2010-07-22 08:14:33 UTC (rev 6607)
+++ trunk/mapbender/http/php/mod_editGuiWms.php	2010-07-22 08:34:34 UTC (rev 6608)
@@ -361,7 +361,7 @@
 echo "<select size='8' name='wmsList' style='width:600px' onchange='submit()'>";
 
 while($row = db_fetch_array($res)){
-	echo "<option title='".$row["wms_abstract"]."'  value='".$row["wms_id"]."' ";
+	echo "<option title='".htmlentities($row["wms_abstract"],ENT_QUOTES,"UTF-8")."'  value='".$row["wms_id"]."' ";
 	if(isset($wmsList) && $wmsList == $row["wms_id"]){
 		echo "selected";
 	}
@@ -412,7 +412,7 @@
    $wms_id[$cnt_w] = $row["wms_id"];
    $wms_version[$cnt_w] = $row["wms_version"];
    $wms_title[$cnt_w] = $row["wms_title"];
-   $wms_abstract[$cnt_w] = $row["wms_abstract"];
+   $wms_abstract[$cnt_w] = htmlentities($row["wms_abstract"],ENT_QUOTES,"UTF-8");
    $wms_getcapabilities[$cnt_w] = $row["wms_getcapabilities"];
    $wms_supportsld[$cnt_w] = $row["wms_supportsld"];  # Buttons zum sld support anzeigen?
    $cnt_w++;

Modified: trunk/mapbender/http/php/mod_editWMS_Metadata.php
===================================================================
--- trunk/mapbender/http/php/mod_editWMS_Metadata.php	2010-07-22 08:14:33 UTC (rev 6607)
+++ trunk/mapbender/http/php/mod_editWMS_Metadata.php	2010-07-22 08:34:34 UTC (rev 6608)
@@ -350,7 +350,7 @@
     <input type='text' name='wms_title_box' value='<?php echo $selected_row["wms_title"];?>' /><td/>
 
     <td>WMS- Abstract:<td><td/>
-    <input type='text' name='wms_abstract_box' value='<?php echo $selected_row["wms_abstract"];?>' /><td/>
+    <input type='text' name='wms_abstract_box' value='<?php echo htmlentities($selected_row["wms_abstract"],ENT_QUOTES,"UTF-8");?>' /><td/>
 
     <td >Fees:<td><td/>
     <input type='text' name='fees_box' value='<?php echo $selected_row["fees"]?>'/><td/>
@@ -432,7 +432,7 @@
         <td><input type='text' size='15' name='L_<?php echo $layer_row['layer_id']?>___layer_title' 
             value='<?php echo $layer_row['layer_title']?>' readonly></td>
         <td><input type='text' size='42' name='L_<?php echo $layer_row['layer_id']?>___layer_abstract'
-            value='<?php echo $layer_row['layer_abstract']?>'>
+            value='<?php echo htmlentities($layer_row['layer_abstract'],ENT_QUOTES,"UTF-8")?>'>
 
     <?php
         $keyword_sql = "SELECT keyword FROM keyword, layer_keyword, layer " .
@@ -495,4 +495,4 @@
     </html>
 <?php
 }
-?>
\ No newline at end of file
+?>

Modified: trunk/mapbender/http/php/mod_loadCapabilitiesList.php
===================================================================
--- trunk/mapbender/http/php/mod_loadCapabilitiesList.php	2010-07-22 08:14:33 UTC (rev 6607)
+++ trunk/mapbender/http/php/mod_loadCapabilitiesList.php	2010-07-22 08:34:34 UTC (rev 6608)
@@ -236,7 +236,7 @@
 	
 		while($row = db_fetch_array($res)){
 			if ($row["wms_title"]!=""){
-				echo "<option title='".$row["wms_abstract"]."' value='".$row["wms_id"]."' ";
+				echo "<option title='".htmlentities($row["wms_abstract"],ENT_QUOTES,"UTF-8")."' value='".$row["wms_id"]."' ";
 				echo ">".$row["wms_title"]."</option>";
 			}
 			$count++;
@@ -266,7 +266,7 @@
 	echo "<select class='select1' name='wmsID' size='20' onchange='submit()'>";
 	$cnt = 0;
 	while($row = db_fetch_array($res)){
-		echo "<option title='".$row["wms_abstract"]."' value='".$row["wms_id"]."' ";
+		echo "<option title='".htmlentities($row["wms_abstract"],ENT_QUOTES,"UTF-8")."' value='".$row["wms_id"]."' ";
 		if($row["wms_owner"] == Mapbender::session()->get("mb_user_id")){
 			echo "style='color:green' ";	
 		}



More information about the Mapbender_commits mailing list