From 671f4cee657f36881eeeea7e5d314034252e3ee7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 21 Mar 2019 21:08:02 +0300 Subject: 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 --- classes/rssutils.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'classes/rssutils.php') diff --git a/classes/rssutils.php b/classes/rssutils.php index 82a6963e8..5aff2f8a3 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -1200,12 +1200,8 @@ class RSSUtils { static function cache_media($html, $site_url) { libxml_use_internal_errors(true); - $charset_hack = ' - - '; - $doc = new DOMDocument(); - $doc->loadHTML($charset_hack . $html); + $doc->loadHTML('' . $html); $xpath = new DOMXPath($doc); $entries = $xpath->query('(//img[@src])|(//video/source[@src])|(//audio/source[@src])'); -- cgit v1.2.3-54-g00ecf