This check exists to prevent invalid HTML inside translations.
This check is aimed at eliminating invalid HTML in translations.
👎 Examples of incorrect code for this check:
{
"hello_html": "<h2>Hello, world</h1>",
"image_html": "<a href='/spongebob'>Unclosed"
}
👍 Examples of correct code for this check:
{% # locales/en.default.json %}
{
"hello_html": "<h1>Hello, world</h1>",
"image_html": "<img src='spongebob.png'>",
"line_break_html": "<br>",
"self_closing_svg_html": "<svg />"
}
The default configuration for this check is the following:
ValidHTMLTranslation:
enabled: true
It is discouraged to to disable this rule.
This check has been introduced in Theme Check 0.1.0.