summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-03-21 21:08:02 +0300
committerAndrew Dolgov <[email protected]>2019-03-21 21:08:02 +0300
commit671f4cee657f36881eeeea7e5d314034252e3ee7 (patch)
tree2dc84b4a15b591e94366b37f39418f6e70a8e593 /classes/handler/public.php
parent3bd3324e5a9171e6cca20b44d1569da41a1d4874 (diff)
domdocument: remove old meta charset unicode hacks, replace with shorter xml preamble utf8 hack (on loadhtml where it makes sense)
af_readability: better (?) charset hack for non-unicode pages
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index f73427cbf..318cecd72 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -329,7 +329,7 @@ class Handler_Public extends Handler {
if (!$og_image) {
$tmpdoc = new DOMDocument();
- if (@$tmpdoc->loadHTML(mb_substr($content, 0, 131070))) {
+ if (@$tmpdoc->loadHTML('<?xml encoding="UTF-8">' . mb_substr($content, 0, 131070))) {
$tmpxpath = new DOMXPath($tmpdoc);
$imgs = $tmpxpath->query("//img");