diff options
author | Andrew Dolgov <[email protected]> | 2024-06-13 15:22:40 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2024-06-13 15:22:40 +0300 |
commit | 4dd70d93d60fbc20d127a8259ac568df4bdd8564 (patch) | |
tree | 46c30e14868af366b4a86c951e7bf93c1c6e8696 /init.php | |
parent | cdc97d886cb7085f9c44a1796ee4bbbf57534d06 (diff) |
add utf8 hack to domdocument loadhtml
Diffstat (limited to 'init.php')
-rwxr-xr-x | init.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -204,7 +204,7 @@ class Af_Readability extends Plugin { if ($tmp && mb_strlen($tmp) < 1024 * 500) { $tmpdoc = new DOMDocument("1.0", "UTF-8"); - if (!@$tmpdoc->loadHTML($tmp)) + if (!@$tmpdoc->loadHTML('<?xml encoding="UTF-8">' . $tmp)) return false; // this is the worst hack yet :( |