Skip to content

no-at-html-tags

Reports a {@html} tag.

{@html} inserts the text as markup, so a value that a user wrote can carry a script and runs it in the page: a cross-site scripting hole.

To fix, write {value} so that the text is escaped, or sanitize it first; turn the rule off for a value you control.

Reported
<p>{@html comment.body}</p>
<p>{comment.body}</p>
...
angular:
lint:
rules:
no-at-html-tags: warn # off, warn (default), error
html:
lint:
rules:
no-at-html-tags: warn # off, warn (default), error
svelte:
lint:
rules:
no-at-html-tags: warn # off, warn (default), error
vue:
lint:
rules:
no-at-html-tags: warn # off, warn (default), error

Enabled by the presets: html/eslint-plugin-svelte-recommended.

Suppress one line with sudsy-disable-next-line no-at-html-tags in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
eslint-plugin-svelte no-at-html-tags full