From ed7eeb11c74bd8fedf40d0618e34c4a6c1f5b10a Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Thu, 14 Nov 2024 17:44:42 -0500 Subject: encoding fix --- rss.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rss.php') diff --git a/rss.php b/rss.php index 022b6e6..4efb696 100644 --- a/rss.php +++ b/rss.php @@ -165,7 +165,9 @@ function strip_html(string $html): string { if ($html === "") return $html; $doc = new DomDocument(); - @$doc->loadHTML($html); + + // this is a really ugly hack but libxml has left me no choice :( + @$doc->loadHTML("".$html); foreach($doc->getElementsByTagName("style")->getIterator() as $el) $el->remove(); @@ -246,7 +248,7 @@ $base = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); - + -- cgit v1.2.3-54-g00ecf