summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2012-04-11 12:22:13 +0000
committerUrban Müller2012-04-11 12:22:13 +0000
commita71aef9ea211dd0edd1718e4a68c027e94e11623 (patch)
treed0a0323d0d4f400ce83ea64ca94001e46f089c93
parent9e93e368efea7436ea555a8cf905613028643df5 (diff)
downloaditools-a71aef9ea211dd0edd1718e4a68c027e94e11623.tar.gz
itools-a71aef9ea211dd0edd1718e4a68c027e94e11623.tar.bz2
itools-a71aef9ea211dd0edd1718e4a68c027e94e11623.zip
faster regex
-rw-r--r--it_html.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 193fc89..ed47abd 100644
--- a/it_html.class
+++ b/it_html.class
@@ -263,7 +263,7 @@ function fix_encoding($string, $silent = false)
{
if (grapheme_strlen($string) === null)
list($string, $error) = array(utf8_encode($string), utf8_encode("incorrectly utf8-encoded: " . trim($string)));
- else if (preg_match('/\xc3\x83(\xc2\x84|\xc2\x9c|\xc2\xa4|\xc2\xb6|\xc2\xbc|\xc2\xa9|\xc2\xa0)/', $string)) # Double encoded ÄÖÜäöüéà, UTF8SAFE
+ else if (preg_match('/\xc3\x83\xc2[\x84\x9c\xa4\xb6\xbc\xa9\xa0]/', $string)) # Double encoded ÄÖÜäöüéà, UTF8SAFE
list($string, $error) = array(utf8_decode($string), utf8_encode("doubly utf8-encoded: " . trim($string)));
if ($error && !$silent)