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
Make hidden input _charset_ check case insensitive #25797
Conversation
The spec for this is changing: whatwg/html#5914
@@ -19,7 +20,8 @@ | |||
const params = new URL(event.data).searchParams; | |||
|
|||
assert_true(params.get("_charset_") != "", "lowercase valid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this and the others to assert_equals with an actual expected value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Ping to get this finished up and merged |
My bad, I addressed the comment |
assert_not_equals(params.get("_charset_"), "", "lowercase valid"); | ||
assert_not_equals(params.get("_CHARSET_"), "", "uppercase valid"); | ||
assert_not_equals(params.get("_ChArSeT_"), "", "mixed case invalid"); | ||
assert_equals(params.get("_charſet_"), "", "non-ASCII invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea was to change them from not_equals to actually testing assert_equals
against the correct value. Which I think is "UTF-8" in this case? Or maybe "utf-8"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh that makes more sense, done!
assert_true(params.get("_charſet_") == "", "non-ASCII invalid"); | ||
assert_equals(params.get("_charset_"), "UTF-8", "lowercase valid"); | ||
assert_equals(params.get("_CHARSET_"), "UTF-8", "uppercase valid"); | ||
assert_equals(params.get("_ChArSeT_"), "UTF-8", "mixed case invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment should be "mixed case valid", isn't it?
The spec for this is changing:
whatwg/html#5914