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

Removing value="" from <input> is not always correct #194

Open
clarfonthey opened this issue Jun 14, 2024 · 0 comments
Open

Removing value="" from <input> is not always correct #194

clarfonthey opened this issue Jun 14, 2024 · 0 comments

Comments

@clarfonthey
Copy link

clarfonthey commented Jun 14, 2024

Per the standard, the default value is "on" for radio and checkbox inputs, not empty string:

Minimal example:

<input type="radio" value="">

gets converted to:

<input type=radio>

which is effectively:

<input type=radio value=on>

This should be handled accordingly, based upon the following table:

type default value
checkbox on
radio on
file C:\fakepath\

For all other types, the default is in fact an empty string. If type is not equal to one of the known types, it should be assumed dynamic and the value thus cannot be removed.

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

No branches or pull requests

1 participant