Merge branch 'master' of trap000d/tt-rss into master

This commit is contained in:
fox 2019-09-18 15:10:41 +00:00 committed by Gogs
commit f1df2c505e
1 changed files with 5 additions and 1 deletions

View File

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