aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rss.php6
1 files changed, 4 insertions, 2 deletions
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("<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>