From 4bbe114c1a859acd12f1dfdcdb04c53ba2d1dc0b Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 22 May 2021 12:54:42 +0100 Subject: Ensure html is valid in atom feeds --- scripts/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/functions.php') diff --git a/scripts/functions.php b/scripts/functions.php index 016b581..9b72803 100644 --- a/scripts/functions.php +++ b/scripts/functions.php @@ -279,7 +279,7 @@ function postToAtomEntry(array $post, string $hostname): string "https://$hostname{$post['url']}", $post['author'], "{$post['date']}T12:00:00Z", - $post['html'], + htmlspecialchars($post['html']), ); } @@ -308,7 +308,7 @@ function buildAtomEntry(string $title, string $href, string $author, string $dat $author $date $date - ![CDATA[$content]] + $content EOF_STR; } -- cgit v1.2.3-13-gbd6f