-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate html5lib-tests encoding cases that are failing #47
Comments
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 name. 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 name. That difference makes us fail two html5-tests cases. Relates to #47
OK, #48 has a fix for the following.
|
OK, #49 has a fix for the following.
|
With the fixes in #48 and #49 applied — and with the changes in html5lib/html5lib-tests#130 merged, we will be passing all the html5lib-tests encoding cases. |
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 name. 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 name. That difference makes us fail two html5-tests cases. Relates to #47
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 name. 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 name. That difference makes us fail two html5-tests cases. Relates to #47
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 name. 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 name. That difference makes us fail two html5-tests cases. Relates to #47
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 name. 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 name. That difference makes us fail two html5-tests cases. Relates to #47
We’re failing 4 test-case types (9 cases in total) in https://github.com/html5lib/html5lib-tests/tree/master/encoding/
As far as I can tell, these cases don’t fail in Firefox.
https://github.com/html5lib/html5lib-tests/blob/master/encoding/tests1.dat#L65
https://github.com/html5lib/html5lib-tests/blob/master/encoding/tests1.dat#L162
https://github.com/html5lib/html5lib-tests/blob/master/encoding/tests1.dat#L314-L347 (6 cases; 2048–8193 characters)
https://github.com/html5lib/html5lib-tests/blob/master/encoding/tests1.dat#L350
The text was updated successfully, but these errors were encountered: