diff options
-rw-r--r-- | rss.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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("<meta charset='UTF-8'>".$html); foreach($doc->getElementsByTagName("style")->getIterator() as $el) $el->remove(); @@ -246,7 +248,7 @@ $base = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); <!doctype html> <html lang="<?= $config['lang'] ?>"> <head> - <meta charset="utf-8"> + <meta charset="UTF-8"> <style><?= $config['custom_css'] ?></style> </head> <body> |