diff --git a/apps/desktop/src/components/settings/ChangelogPanel.vue b/apps/desktop/src/components/settings/ChangelogPanel.vue index d52358eb9f..aba18982cf 100644 --- a/apps/desktop/src/components/settings/ChangelogPanel.vue +++ b/apps/desktop/src/components/settings/ChangelogPanel.vue @@ -7,7 +7,8 @@ import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; import { currentLocale } from "@/i18n"; import { isTauriRuntime } from "@/lib/backend/tauriRuntime"; -import { changelogLangFromLocale, changelogReleaseUrl, changelogWebsiteUrl, createLatestRequestGuard, fetchChangelog, type ChangelogLang, type ChangelogRelease } from "@/lib/app/changelog"; +import { formatAiInlineMarkdownFragment, handleAiMarkdownLinkClick } from "@/lib/ai/aiMarkdown"; +import { changelogLangFromLocale, changelogReleaseUrl, changelogWebsiteUrl, createLatestRequestGuard, fetchChangelog, type ChangelogItem, type ChangelogLang, type ChangelogRelease } from "@/lib/app/changelog"; const PAGE_SIZE = 5; @@ -80,6 +81,11 @@ function openExternalUrl(url: string) { } } +function formatChangelogItemHtml(item: ChangelogItem): string { + const title = formatAiInlineMarkdownFragment(item.title); + return item.desc ? `${title} — ${formatAiInlineMarkdownFragment(item.desc)}` : title; +} + function isExpanded(tag: string) { return expandedTags.value.has(tag); } @@ -193,10 +199,7 @@ watch(changelogLang, (lang) => {
");
+ expect(html).toContain('href="https://example.com/pull/1"');
+ expect(html).toContain(" {
+ const html = formatAiInlineMarkdownFragment("");
+
+ expect(html).toContain("<script>alert(1)</script>");
+ expect(html).not.toContain("