We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require-css-escape
CSS.escape should always be used when interpolating arbritrary variables into a CSS selector to ensure correct escaping.
document.querySelector(`#${id}`);
el.querySelectorAll(`a[href^="#${hash}"]`);
document.querySelector(`#${CSS.escape(id)}`);
el.querySelectorAll(`a[href^="#${CSS.escape(hash)}"]`);
Any tagged template should not trigger the rule:
document.querySelector(cssEscape`#${id}`);
The text was updated successfully, but these errors were encountered:
Accepted
Sorry, something went wrong.
No branches or pull requests
Description
CSS.escape should always be used when interpolating arbritrary variables into a CSS selector to ensure correct escaping.
Fail
Pass
Any tagged template should not trigger the rule:
The text was updated successfully, but these errors were encountered: