summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2021-05-22 12:54:42 +0100
committerDavid T. Sadler <davidtsadler@googlemail.com>2021-05-22 12:54:42 +0100
commit4bbe114c1a859acd12f1dfdcdb04c53ba2d1dc0b (patch)
tree4599a2e8d28902e1da24de4309f7e350c2e73cd9 /scripts
parent7eb2bef6469ad5730099d55858ed37183d06ccc6 (diff)
Ensure html is valid in atom feeds
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions.php4
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;
}