From 9e9a0c189ac2c9490cb605addef18a06e69fe138 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 8 Oct 2009 13:37:44 +0000 Subject: leave quote entities alone --- it_xml.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = '_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', '&$1;', $xmldata), ENT_QUOTES, $this->_p['encoding']); + $xmldata = html_entity_decode(preg_replace('/&(amp|lt|gt|#38|#60|#62|#x26|#x3C|#x3E);/i', '&$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)) -- cgit v1.2.3