summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <[email protected]>2019-09-18 15:10:41 +0000
committerGogs <[email protected]>2019-09-18 15:10:41 +0000
commitf1df2c505e09cb6dfb772a89b7744383dabfb0be (patch)
treeca77f7b14f5a622142df74db251d7610395e186d
parentd2d9bb1fd822649d71edc11b4f33f7d8c1b74f63 (diff)
parent7a4d5cc7241f4986de4d8e13f7508636f2ab7f45 (diff)
Merge branch 'master' of trap000d/tt-rss into master
-rwxr-xr-xplugins/af_readability/init.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php
index b6bc8e95e..a487707c8 100755
--- a/plugins/af_readability/init.php
+++ b/plugins/af_readability/init.php
@@ -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 {