dperini / nwsapi

Fast CSS Selectors API Engine
MIT License
103 stars 35 forks source link

fix attribute selector with string escape #86

Closed sophiebits closed 1 year ago

sophiebits commented 1 year ago

fixes #84

test plan: edited

diff --git a/test/css3-compat/css3-compat.html b/test/css3-compat/css3-compat.html
index 966bc30..0ec60aa 100644
--- a/test/css3-compat/css3-compat.html
+++ b/test/css3-compat/css3-compat.html
@@ -46,7 +46,7 @@
     .blox6[\_foo="\e9"] { background-color: lime; }

     /* test 4 : [~=] */
-    .blox7[class~="foo"] { background-color: lime; }
+    .blox7[class~="f\6f o"] { background-color: lime; }
     .blox8, .blox9, .blox10 { background-color: lime; }
     .blox8[class~=""] { background-color: red; }
     .blox9[foo~=""] { background-color: red; }

and verified that all boxes are green (with both querySelectorAll and nwsapi)

dperini commented 1 year ago

@sophiebits I forgot to add your correction before starting with modifications. Could you please redo the pull request against current nwsapi master ? I will then apply the commit as soon as you send it. Sorry for that extra work I asked. Your suggestions are correct ... welcome and appreciated.

dperini commented 1 year ago

@sophiebits I have added your fix manually so I will now close this issue. Thank you for your hepl.

sophiebits commented 1 year ago

Ah sorry, I missed your last comment! Thanks for taking a look.