Commit bf69e45
committed
Conform encoding-label matching to Encoding spec
This change makes the parser’s encoding-name matching conform to the current
Encoding spec at https://encoding.spec.whatwg.org/#concept-encoding-get —
which requires that only leading and trailing whitespace be removed from
a string before checking if it matches any valid encoding names.
Otherwise, without this change, the parser instead implements
https://www.unicode.org/reports/tr22/tr22-8.html#Charset_Alias_Matching —
which requires deleting “all characters except a-z, A-Z, and 0-9” from
a string before checking if it matches any valid encoding names. That
difference makes us fail two html5-tests cases.1 parent 3f48926 commit bf69e45
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 257 | + | |
260 | 258 | | |
261 | 259 | | |
262 | 260 | | |
| |||
0 commit comments