From 0866fe93ba8bdb2ac6686c7eacbed9de1c6951eb Mon Sep 17 00:00:00 2001 From: Ruben Date: Sun, 10 May 2026 20:54:56 +0200 Subject: [PATCH] Strip script and style tags from feed output --- app/router.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/router.php b/app/router.php index 8ad8231..733eb7c 100644 --- a/app/router.php +++ b/app/router.php @@ -104,6 +104,12 @@ if (str_ends_with($ctx->requestPath, 'feed.xml')) { foreach ($contentFiles as $file) { $item['content'] .= renderContentFile($file, $ctx); } + // Strip #is', '', $item['content']); + if ($stripped !== null) { + $stripped = preg_replace('#]*>.*?#is', '', $stripped); + } + $item['content'] = $stripped ?? $item['content']; } unset($item);