|
|
@ -180,8 +180,12 @@ 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);
|
|
|
|
|
|
|
|
if (empty($tmpdoc->encoding)) {
|
|
|
|
|
|
|
|
$tmp = mb_convert_encoding($tmp, 'utf-8');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$tmp = mb_convert_encoding($tmp, 'utf-8', $tmpdoc->encoding);
|
|
|
|
$tmp = mb_convert_encoding($tmp, 'utf-8', $tmpdoc->encoding);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$r = new Readability(new Configuration());
|
|
|
|
$r = new Readability(new Configuration());
|
|
|
|