diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2021-05-22 12:54:42 +0100 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2021-05-22 12:54:42 +0100 |
| commit | 4bbe114c1a859acd12f1dfdcdb04c53ba2d1dc0b (patch) | |
| tree | 4599a2e8d28902e1da24de4309f7e350c2e73cd9 /scripts | |
| parent | 7eb2bef6469ad5730099d55858ed37183d06ccc6 (diff) | |
Ensure html is valid in atom feeds
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
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><name>$author</name></author> <published>$date</published> <updated>$date</updated> - <content>![CDATA[$content]]</content> + <content type="html">$content</content> </entry> EOF_STR; } |
