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.

```js
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 https://github.com/w3c/csswg-drafts/issues/4820#issuecomment-593129197 using your GitHub account

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