Repository navigation
Commit b9093da
fix(parser): match foreign end tags ASCII case-insensitively
The foreign-content "any other end tag" steps compare the node's name converted to ASCII lowercase. `String#toLowerCase` also folds non-ASCII characters (U+212A KELVIN SIGN becomes `k`), so an element could fail to match its own end tag or match another one. The stored name is compared against the token name and the SVG adjustment-map name instead: start-tag names are ASCII-lowercased by the tokenizer and tree construction only adds ASCII uppercase through that map, so the comparison is ASCII-exact and allocates nothing.
Co-Authored-By: Claude Fable 5.1 <[email protected]>1 parent 61676e2 commit b9093da
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3814 | 3814 | | |
3815 | 3815 | | |
3816 | 3816 | | |
3817 | | - | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
3818 | 3820 | | |
3819 | 3821 | | |
3820 | 3822 | | |
| |||
0 commit comments