Commit 61819ae
committed
bug #2663 [Autocomplete] Escape querySelector option value (Bartheyrman22)
This PR was merged into the 2.x branch.
Discussion
----------
[Autocomplete] Escape querySelector option value
Properly escape the querySelector for option-values like "["Test"]"/
This to mitigate:
```
SyntaxError: Element.querySelector: ':scope > option[value="["foo"]"]' is not a valid selector
```
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? |no
| Issues |
| License | MIT
Some remark where I don't have a solution for:
The issue is only reproduceable on Chrome.
In Firefox, the code in the controller.js is not executed properly. So the error get's never triggered.
But no side effects detected so far.
Commits
-------
c330c1d [Autocomplete] Escape `querySelector` dynamic selector with `CSS.escape()`File tree
3 files changed
+6
-2
lines changed- src/Autocomplete
- assets
- dist
- src
3 files changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
0 commit comments