mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:55:55 +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:
@@ -19,11 +19,7 @@ class Af_Fsckportal extends Plugin {
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
$charset_hack = '<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
</head>';
|
||||
|
||||
@$doc->loadHTML($charset_hack . $article["content"]);
|
||||
@$doc->loadHTML('<?xml encoding="UTF-8">' . $article["content"]);
|
||||
|
||||
if ($doc) {
|
||||
$xpath = new DOMXPath($doc);
|
||||
|
||||
Reference in New Issue
Block a user