Skip to content

noSvelteAtHtmlTags (HTML)

Language HTML
biome.json
{
"linter": {
"rules": {
"nursery": {
"noSvelteAtHtmlTags": "error"
}
}
}
}

Disallow the use of Svelte’s {@html} tag.

The {@html} tag renders its value as unescaped HTML. This can lead to cross-site scripting (XSS) vulnerabilities when the value contains untrusted content.

If raw HTML is required, sanitize the value before passing it to {@html}.

{@html content}
code-block.svelte:1:1 lint/nursery/noSvelteAtHtmlTags ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The {@html} tag renders unescaped HTML.

> 1 │ {@html content}
^^^^^^^^^^^^^^^
2 │

Using {@html} can lead to cross-site scripting (XSS) vulnerabilities.

Render the value as text, or sanitize it before using {@html}.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

{content}