aboutsummaryrefslogtreecommitdiffstats
path: root/rss.php
diff options
context:
space:
mode:
Diffstat (limited to 'rss.php')
-rw-r--r--rss.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/rss.php b/rss.php
index 4efb696..2669085 100644
--- a/rss.php
+++ b/rss.php
@@ -175,6 +175,19 @@ function strip_html(string $html): string {
$el->remove();
foreach($doc->getElementsByTagName("link")->getIterator() as $el)
$el->remove();
+ foreach($doc->getElementsByTagName("meta")->getIterator() as $el)
+ $el->remove();
+ foreach($doc->getElementsByTagName("base")->getIterator() as $el)
+ $el->remove();
+ foreach($doc->getElementsByTagName("title")->getIterator() as $el)
+ $el->remove();
+ foreach($doc->getElementsByTagName("template")->getIterator() as $el)
+ $el->remove();
+ foreach($doc->getElementsByTagName("slot")->getIterator() as $el)
+ $el->remove();
+
+ foreach($doc->getElementsByTagName("img")->getIterator() as $el)
+ $el->setAttribute("loading", "lazy");
foreach($doc->getElementsByTagName("*")->getIterator() as $el) {
if (str_starts_with($el->getAttribute("href"), "javascript:"))