Skip to content
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

Merged
merged 3 commits into from Oct 8, 2020

Conversation

josepharhar
Copy link
Contributor

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");
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@domenic
Copy link
Member

domenic commented Oct 8, 2020

Ping to get this finished up and merged

@josepharhar
Copy link
Contributor Author

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");
Copy link
Member

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"?

Copy link
Contributor Author

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!

@domenic domenic merged commit 8562871 into web-platform-tests:master Oct 8, 2020
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");
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants