mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 18:06:02 +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:
@@ -190,12 +190,8 @@ class Cache_Starred_Images extends Plugin implements IHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
$charset_hack = '<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
</head>';
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML($charset_hack . $content);
|
||||
$doc->loadHTML('<?xml encoding="UTF-8">' . $content);
|
||||
$xpath = new DOMXPath($doc);
|
||||
|
||||
$entries = $xpath->query('(//img[@src])|(//video/source[@src])');
|
||||
|
||||
Reference in New Issue
Block a user