Control which HTML tags are allowed in your markdown content using allowHtmlOnly and buildUnsupportedHTML.
Allow All HTML
All HTML tags are rendered as-is. This includes potentially dangerous tags like <script> and <iframe>.
This paragraph has bold and italic markdown formatting.
HTML strong tag and HTML em tag.
Allow All HTML
<SvelteMarkdown source={markdown} />Allow Only Safe
import { allowHtmlOnly } from '@humanspeak/svelte-markdown'
const html = allowHtmlOnly(['strong', 'em', 'div', 'span',
'details', 'summary', 'sup', 'sub', 'cite', 'a'])
<SvelteMarkdown source={markdown} renderers={{ html }} />Block All HTML
import { buildUnsupportedHTML } from '@humanspeak/svelte-markdown'
const html = buildUnsupportedHTML()
<SvelteMarkdown source={markdown} renderers={{ html }} />