BLOG-72 Fix img cannot be shown on content page #74

Merged
squid merged 1 commits from BLOG-72_fix_image_not_shown_in_post_content_page into release/0.2 2025-07-26 00:33:17 +08:00
Showing only changes of commit dc052c1927 - Show all commits

View File

@ -5,7 +5,9 @@
const { html }: { html: string } = $props();
const sanitizedHtml = $derived(sanitizeHtml(html));
const sanitizedHtml = $derived(
sanitizeHtml(html, { allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']) })
);
</script>
{@html sanitizedHtml}