diff options
Diffstat (limited to 'rss.php')
-rw-r--r-- | rss.php | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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:")) |