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
Allow URLEncodedForms to decode 'on' value als Bool => true #2698
Conversation
110a3b2
to
5137fc8
Compare
@bobvoorneveld Thanks for this! Just a note to say it hasn't been forgotten, I just to spend some time to sit down and read the form spec etc to make sure we're all good. But wanted you to know this wasn't getting lost in a void! |
NP, keep up the good work! I'm just merging main because I'm using my own branch as the base of one of my projects. |
Reading some documentation on input checkboxes via https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
I can solve this by adding a value to 1 in the input type. But would be nice to support this behaviour? Is this the spec that you need to confirm? https://html.spec.whatwg.org/multipage/input.html#dom-input-value-default-on |
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.
LGTM, spec looks correct
I also don't know if this is a semver-minor or semver-patch |
These changes are now available in 4.69.1 |
When a HTML form uses a checkbox to check something as a Bool, it sends the 'on' value if checked.
The URLEncodedForms decoder should be able to handle that.
fixes #2444