[fusion-commits] r1719 - branches/fusion-1.1/common/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Dec 18 14:06:33 EST 2008


Author: madair
Date: 2008-12-18 14:06:32 -0500 (Thu, 18 Dec 2008)
New Revision: 1719

Modified:
   branches/fusion-1.1/common/php/Utilities.php
Log:
re #197: add call to addslashes for text nodes to escape quotes

Modified: branches/fusion-1.1/common/php/Utilities.php
===================================================================
--- branches/fusion-1.1/common/php/Utilities.php	2008-12-17 21:02:12 UTC (rev 1718)
+++ branches/fusion-1.1/common/php/Utilities.php	2008-12-18 19:06:32 UTC (rev 1719)
@@ -65,6 +65,7 @@
     if ($domElement->nodeType == XML_TEXT_NODE) {
         /* text node, just return content */
         $text = trim($domElement->textContent);
+        $text = addslashes($text);
         if ($text != '') {
             $result = '"'.$text.'"';
         } else {
@@ -93,6 +94,7 @@
                 }
                 if ($child->nodeType == XML_TEXT_NODE) {
                     $text = trim($child->textContent);
+                    $text = addslashes($text);
                     if ($text == '') {
                         continue;
                     }



More information about the fusion-commits mailing list