summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_xml.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_xml.class b/it_xml.class
index 7584c1e..644ef9e 100644
--- a/it_xml.class
+++ b/it_xml.class
@@ -120,7 +120,7 @@ function _sanitize($xmldata, $isutf8 = null)
if (!preg_match('/^(<\?xml|\xEF\xBB\xBF|\xFE\xFF|\xFF\xFE|\x00\x00\xFE\xFF|\x00\x00\xFF\xFE)/', $xmldata))
$xmldata = '<?xml version="1.0" encoding="' . $this->_p['encoding'] . '"?>' . $xmldata;
- $isutf8 = (!preg_match('/^<\?xml[^>]* encoding=/i', $xmldata) || preg_match('/^<\?xml[^>]* encoding=.utf-8/i', $xmldata));
+ $isutf8 = (!preg_match('/^<\?xml[^>]* encoding=/i', $xmldata) || preg_match('/^<\?xml[^>]* encoding=.utf-?8/i', $xmldata));
}
# Decode illegal entities but protect semantically important ones