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
Describe the bug The queryselector will mistakenly categorizes the selector as an ID selector if the selector contains an # symbol.
#
happy-dom/packages/happy-dom/src/query-selector/SelectorItem.ts
Line 36 in e91b864
The # symbol can also be used without escaping for attribute values such as colour. [fill=#111].
[fill=#111]
To Reproduce Steps to reproduce the behavior: Try to QuerySelect for elements with # symbol in their attributes.
var happyDom = require("happy-dom") const win = new happyDom.Window(); win.document.body.innerHTML = `<svg width=10px height=10px xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="#111" d="M5 5L15 5L15 15L5 15"></path></svg>`; const allpaths = win.document.querySelectorAll('path[fill="#111"]'); console.log('all paths: ' + allpaths.length); // This will return 0
Expected behavior The QuerySelector should find elements with # in their attribute values. ie: [fill=#111]
The text was updated successfully, but these errors were encountered:
It seems to have been fixed by #662 .
Sorry, something went wrong.
No branches or pull requests
Describe the bug
The queryselector will mistakenly categorizes the selector as an ID selector if the selector contains an
#
symbol.happy-dom/packages/happy-dom/src/query-selector/SelectorItem.ts
Line 36 in e91b864
The
#
symbol can also be used without escaping for attribute values such as colour.[fill=#111]
.To Reproduce
Steps to reproduce the behavior:
Try to QuerySelect for elements with
#
symbol in their attributes.Expected behavior
The QuerySelector should find elements with
#
in their attribute values. ie:[fill=#111]
The text was updated successfully, but these errors were encountered: