summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2009-10-08 13:37:44 +0000
committerUrban Müller2009-10-08 13:37:44 +0000
commit9e9a0c189ac2c9490cb605addef18a06e69fe138 (patch)
treed8eebf72b147e8347224583b01784c8c49351c93
parenta84c0754352b5f3833464d32283b1a9da0eabe10 (diff)
downloaditools-9e9a0c189ac2c9490cb605addef18a06e69fe138.tar.gz
itools-9e9a0c189ac2c9490cb605addef18a06e69fe138.tar.bz2
itools-9e9a0c189ac2c9490cb605addef18a06e69fe138.zip
leave quote entities alone
-rw-r--r--it_xml.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_xml.class b/it_xml.class
index 69754ff..a048b58 100644
--- a/it_xml.class
+++ b/it_xml.class
@@ -90,7 +90,7 @@ function from_xml($xmldata, $p)
$xmldata = '<?xml version="1.0" encoding="' . $this->_p['encoding'] . '"?>' . $xmldata;
# Decode illegal entities but protect semantically important ones
- $xmldata = html_entity_decode(preg_replace('/&(amp|lt|gt|#38|#60|#62|#x26|#x3C|#x3E);/i', '&amp;$1;', $xmldata), ENT_QUOTES, $this->_p['encoding']);
+ $xmldata = html_entity_decode(preg_replace('/&(amp|lt|gt|#38|#60|#62|#x26|#x3C|#x3E);/i', '&amp;$1;', $xmldata), ENT_NOQUOTES, $this->_p['encoding']);
# If should be utf-8 and can't be decoded as such, fix it, even if mixed between both
if (!preg_match('/^<\?xml[^>]* encoding=/i', $xmldata) || preg_match('/^<\?xml[^>]* encoding=.UTF-8/i', $xmldata))