mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 00:05:56 +00:00
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
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user