DOMException
is thrown for substring matching attribute selectors with whitespaces
#911
Labels
bug
Something isn't working
Describe the bug
DOMException: Invalid selector is thrown for attribute selector with spaces, e.g.
a[href]:not([href *= "javascript:" i])
. Notice whitespace around*=
. This selector is valid in browser environment.To Reproduce
Steps to reproduce the behavior:
document.querySelectorAll('a[href]:not([href *= "javascript:" i])');
inhappy-dom
environment.Expected behavior
Selector
a[href]:not([href *= "javascript:" i])
should be considered correct.Device:
Additional context
Doesn't throw in version 9.11.0, regression introduced in 9.12.0.
Selector in the example is used by
tiptap
here https://github.com/ueberdosis/tiptap/blob/62d436569a44fd14966e9a9625f8a981b8a275cd/packages/extension-link/src/link.ts#L117.The text was updated successfully, but these errors were encountered: