Commit f34abc5
fix: decode html entities correctly (#8047)
fixes #8026 1. replace the big entities list with entities that have a ; at the end where valid (there are some exceptions) 2. construct two regexes from that entities list: one for HTML where it's strictly matched, one for attributes where it tries to match browser behavior by also allowing = / digit / character afterwards 3. decode character references with one of these regexes depending on this is an attribute value or not --------- Co-authored-by: Yuichiro Yamashita <xydybaseball@gmail.com>1 parent aa15a64 commit f34abc5
File tree
8 files changed
+2218
-1936
lines changed- src/compiler/parse
- state
- utils
- test/runtime/samples
- html-entities-inside-attributes
- html-entities
8 files changed
+2218
-1936
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments