Re: [csswg-drafts] [css-selectors][css-escape] Cannot select attributes with multiple escaped chars (#4820)

Yes, you are missing something, you should escape the backslash in `WINDOWS\system32`.
And it's fine but unnecessary to escape `:` and `.` in a string.

var li = document.createElement("li");
li.dataset.path = String.raw`c:\WINDOWS\system32\mspaint.exe`;
li.matches(String.raw`li[data-path^="c:\\WINDOWS\\system32\\mspaint.exe"]`); // true
li.matches(String.raw`li[data-path^=c\:\\WINDOWS\\system32\\mspaint\.exe]`); // true

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at using your GitHub account

Received on Sunday, 1 March 2020 18:33:21 UTC