Wrap atom content in CDATA tag

This commit is contained in:
Râu Cao 2024-10-23 14:01:54 +02:00
parent e921fb2d84
commit a9f13310ab
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -17,7 +17,9 @@ export function profileAtomFeed(profile: Profile, articles: Article[]) {
<link href="${article.url}" />
<updated>${isoDate(article.updatedAt)}</updated>
<summary>${article.summary}</summary>
<content type="html">${article.html}</content>
<content type="html"><![CDATA[
${article.html}
]]></content>
</entry>
`;
}).join("\n");
@ -25,7 +27,7 @@ export function profileAtomFeed(profile: Profile, articles: Article[]) {
return `
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>${profile.name} on Nostr</title>
<title>${profile.name} on Nostr (Articles)</title>
<id>${feedId}</id>
<updated>${isoDate(lastUpdate)}</updated>
<icon>${profile.picture}</icon>