no-at-html-tags
Angular templatesHTMLVue / SvelteVue / Sveltesuspiciousno fixdefault: warnhtml/eslint-plugin-svelte-recommended
What it does
Section titled “What it does”Reports a {@html} tag.
Why it matters
Section titled “Why it matters”{@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.
Example
Section titled “Example”<p>{@html comment.body}</p><p>{comment.body}</p>...Configuration
Section titled “Configuration”angular: lint: rules: no-at-html-tags: warn # off, warn (default), errorhtml: lint: rules: no-at-html-tags: warn # off, warn (default), errorsvelte: lint: rules: no-at-html-tags: warn # off, warn (default), errorvue: lint: rules: no-at-html-tags: warn # off, warn (default), errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| eslint-plugin-svelte | no-at-html-tags |
full |