Commit 1c73c3f
fix: Properly decode CSS escape sequences in attribute selector values (#2080)
* fix: Properly decode CSS escape sequences in attribute selector values
CSS.escape() produces hex escape sequences (e.g. \30 for "0") that
querySelectorAll failed to match because the parser only stripped
backslashes instead of decoding them per the CSS Syntax Level 3 spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix ref
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7fa06b3 commit 1c73c3f
File tree
2 files changed
+66
-4
lines changed- packages/happy-dom
- src/query-selector
- test/query-selector
2 files changed
+66
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
349 | 357 | | |
350 | 358 | | |
351 | 359 | | |
| 360 | + | |
352 | 361 | | |
353 | 362 | | |
354 | 363 | | |
355 | 364 | | |
356 | | - | |
| 365 | + | |
357 | 366 | | |
358 | 367 | | |
359 | 368 | | |
360 | | - | |
| 369 | + | |
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
364 | 373 | | |
365 | 374 | | |
366 | 375 | | |
| 376 | + | |
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
370 | 380 | | |
371 | | - | |
| 381 | + | |
372 | 382 | | |
373 | | - | |
| 383 | + | |
374 | 384 | | |
375 | 385 | | |
376 | 386 | | |
| |||
635 | 645 | | |
636 | 646 | | |
637 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
638 | 666 | | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
652 | 686 | | |
653 | 687 | | |
654 | 688 | | |
| |||
0 commit comments