af_readability: relax non-unicode hack to apply to HTML4 meta element markup

This commit is contained in:
Andrew Dolgov 2019-06-06 15:18:47 +03:00
parent d36b64d8a7
commit 967cccb7c5
1 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ class Af_Readability extends Plugin {
// this is the worst hack yet :( // this is the worst hack yet :(
if (strtolower($tmpdoc->encoding) != 'utf-8') { if (strtolower($tmpdoc->encoding) != 'utf-8') {
$tmp = preg_replace("/<meta.*?charset.*?\/>/i", "", $tmp); $tmp = preg_replace("/<meta.*?charset.*?\/?>/i", "", $tmp);
$tmp = mb_convert_encoding($tmp, 'utf-8', $tmpdoc->encoding); $tmp = mb_convert_encoding($tmp, 'utf-8', $tmpdoc->encoding);
} }