From 8ace003be8ca4e1892f76f48eba3d1c5df22ed20 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 14 Apr 2010 16:20:26 +0000 Subject: remove bogus chars in latin input --- it_xml.class | 3 +++ 1 file changed, 3 insertions(+) diff --git a/it_xml.class b/it_xml.class index bf71031..a861245 100644 --- a/it_xml.class +++ b/it_xml.class @@ -133,6 +133,9 @@ function _sanitize($xmldata, $isutf8 = null) 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); + if (!$isutf8) + $xmldata = it_html::latinize($xmldata); + return array($xmldata, $isutf8); } -- cgit v1.2.3