diff options
Diffstat (limited to 'it_xml.class')
-rw-r--r-- | it_xml.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_xml.class b/it_xml.class index 2401b7b..4e34c81 100644 --- a/it_xml.class +++ b/it_xml.class @@ -131,7 +131,7 @@ function _sanitize($xmldata, $isutf8 = null) # If should be utf-8 and can't be decoded as such, fix it, even if mixed between both if ($isutf8 && preg_match('/[^\x80-\xff][\x80-\xff][^\x80-\xff]/', $xmldata)) - $xmldata = preg_replace('/[\x80-\xff]{1,4}/e', "it_xml::_utf8_fix('\\0')", $xmldata); + $xmldata = preg_replace_callback('/[\x80-\xff]{1,4}/', function($m) { return it_xml::_utf8_fix($m[0]); }, $xmldata); # If not utf-8, remove characters illegal for latin-1 if (!$isutf8 && preg_match('/[\x00-\x08\x0b-\x0c\x0e-\x1f\x80-\x9f]/', $xmldata)) |