spec-char-escape
Special characters must be escaped.
Level: Error
Config value
Section titled “Config value”true
: enable rulefalse
: disable rule
The following patterns are not considered violations
Section titled “The following patterns are not considered violations”<span>aaa>bbb<ccc</span><span>Steinway & Sons, Q&A</span><span>Steinway & Sons, Q&A</span>
The following pattern is considered a rule violation:
Section titled “The following pattern is considered a rule violation:”<span>aaa>bbb<ccc</span>
Why this rule is important
Section titled “Why this rule is important”Special HTML characters like <
, >
, and &
must be escaped to prevent them from being interpreted as HTML tags or entities. This avoids rendering issues and potential cross-site scripting (XSS) vulnerabilities.