✅ The extends: 'recommended' property in a configuration file enables this rule.
Ember has a runtime warning that says:
Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped.
This warning can only be avoided by marking the bound value with Ember.String.htmlSafe. While we can't always detect statically if you're providing a safe string, we can detect and forbid common cases where it's impossible that you're doing so.
Common cases which do not propagate htmlSafe include:
- Implied string concatenation using quotes
- The
concathelper
This rule forbids the following:
This rule allows the following:
- See the Binding Style Attributes Ember deprecation documentation
- See the documentation for Ember's
htmlSafefunction - See the documentation for Ember's
concathandlebars template helper - See the documentation for the
html-safehandlebars template helper from theember-cli-string-helpersaddon