fix: remove redundant CDATA

This commit is contained in:
Abhishek 2025-07-13 23:36:12 +05:30
parent 744ca144fe
commit 1e203cd208

View File

@ -55,7 +55,7 @@ function generateRSSFeed(cfg: GlobalConfiguration, idx: ContentIndexMap, limit?:
const base = cfg.baseUrl ?? ""
const createURLEntry = (slug: SimpleSlug, content: ContentDetails): string => `<item>
<title><![CDATA[ ${escapeHTML(content.title)} ]]></title>
<title>${escapeHTML(content.title)}</title>
<link>https://${joinSegments(base, encodeURI(slug))}</link>
<guid>https://${joinSegments(base, encodeURI(slug))}</guid>
<description><![CDATA[ ${content.richContent ?? content.description} ]]></description>
@ -81,11 +81,11 @@ function generateRSSFeed(cfg: GlobalConfiguration, idx: ContentIndexMap, limit?:
return `<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[ ${escapeHTML(cfg.pageTitle)} ]]></title>
<title>${escapeHTML(cfg.pageTitle)}</title>
<link>https://${base}</link>
<description><![CDATA[ ${!!limit ? i18n(cfg.locale).pages.rss.lastFewNotes({ count: limit }) : i18n(cfg.locale).pages.rss.recentNotes} on ${escapeHTML(
<description>${!!limit ? i18n(cfg.locale).pages.rss.lastFewNotes({ count: limit }) : i18n(cfg.locale).pages.rss.recentNotes} on ${escapeHTML(
cfg.pageTitle,
)} ]]></description>
)}</description>
<generator>Quartz -- quartz.jzhao.xyz</generator>
${items}
</channel>