RESOLVED CONFIGURATION CHANGED 178392
DOM Selector parsing doesn't support selectors without ending tokens
https://bugs.webkit.org/show_bug.cgi?id=178392
Summary DOM Selector parsing doesn't support selectors without ending tokens
Jordan Foreman
Reported 2017-10-17 09:30:05 PDT
This bug was originally uncovered through jQuery's selector, but the behavior is consistent with document.querySelector (the underlying selector parsing is the same). Per the CSS Working Group's spec - https://drafts.csswg.org/css-syntax/#rule-defs: > When defining a function or a block, the ending token must be specified in the grammar, but if it’s not present in the eventual token stream, it still matches. For example, the following will throw an exception in Safari: ``` document.querySelector('[data-my-target="someId"'); ``` Note the lack of a closing brace (]) in the selector. While I have my own opinions on this matter, it is inconsistent with other major browsers (Chrome and Firefox), and seems to run contrary to the working group's specification. Note: this may be an issue specifically with Safari and not Webkit. I don't have access to Webkit builds on my work computer, otherwise I'd validate that
Attachments
Anne van Kesteren
Comment 1 2024-03-15 05:54:35 PDT
Thanks for the report! It seems this got fixed at some point.
Note You need to log in before you can comment on or make changes to this bug.