Skip to main content

ValidHTMLTranslation

Identifies invalid HTML inside translations.


The following examples contain code snippets that either fail or pass this check.

{
"hello_html": "<h2>Hello, world</h1>",
"image_html": "<a href='/cat'>Unclosed"
}

{
"hello_html": "<h1>Hello, world</h1>",
"image_html": "<img src="cat.png" />",
"line_break_html": "<br />",
"self_closing_svg_html": "<svg />"
}

ValidHTMLTranslation:
enabled: true
severity: warning
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?