summaryrefslogtreecommitdiff
path: root/plugins/cache_starred_images
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 /plugins/cache_starred_images
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 'plugins/cache_starred_images')
-rwxr-xr-xplugins/cache_starred_images/init.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index a1916e226..714d4cb9b 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -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])');