diff options
author | Urban Müller | 2010-04-14 16:20:26 +0000 |
---|---|---|
committer | Urban Müller | 2010-04-14 16:20:26 +0000 |
commit | 8ace003be8ca4e1892f76f48eba3d1c5df22ed20 (patch) | |
tree | 579b36873cbfc4ccc135b55f0194063368b03a1d | |
parent | 84e8dff59003dcd3148382e6c6c735fdf65f0086 (diff) | |
download | itools-8ace003be8ca4e1892f76f48eba3d1c5df22ed20.tar.gz itools-8ace003be8ca4e1892f76f48eba3d1c5df22ed20.tar.bz2 itools-8ace003be8ca4e1892f76f48eba3d1c5df22ed20.zip |
remove bogus chars in latin input
-rw-r--r-- | it_xml.class | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |