Skip to content

Commit 46147e2

Browse files
authored
[TASK] Test escaped quotes in selectors outside of strings (#1489)
The extra datasets cover the kind of selectors reported in the OP of #1485.
1 parent 9fd06ec commit 46147e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Please also have a look at our
1010

1111
### Added
1212

13-
- Add support for escaped quotes in the selectors (#1485)
13+
- Add support for escaped quotes in the selectors (#1485, #1489)
1414
- Provide line number in exception message for mismatched parentheses in
1515
selector (#1435)
1616
- Add support for CSS container queries (#1400)

tests/Unit/Property/SelectorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,10 @@ public static function provideSelectorsWithEscapedQuotes(): array
385385
'escaped backslash followed by quote' => ['a[data-test="test\\\\"]'],
386386
'escaped backslash before escaped quote' => ['a[data-test="test\\\\\\"value"]'],
387387
'triple backslash before quote' => ['a[data-test="test\\\\\\""]'],
388+
'escaped single quotes in selector itself, with other escaped characters'
389+
=> ['.before\\:content-\\[\\\'\\\'\\]:before'],
390+
'escaped double quotes in selector itself, with other escaped characters'
391+
=> ['.before\\:content-\\[\\"\\"\\]:before'],
388392
];
389393
}
390394

0 commit comments

Comments
 (0)