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}`);
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too