mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 04:35:56 +00:00
Fix error "mb_convert_encoding(): Illegal character encoding specified"
modified: plugins/af_readability/init.php
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user