-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
autocomplete for hidden type #59294
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
Comments
I guess it's to make sure the field isn't going to be autocomplete, which would make it impossible to submit the form. This attribute was added in 7.2 by 27d8a31. According to Mozilla docs
But also, the spec allows it for a specific use-case.
|
@GromNaN the spec allows the |
see #59296 |
…lete set to off (xabbuh) This PR was merged into the 7.2 branch. Discussion ---------- [Form] do not render hidden CSRF token forms with autocomplete set to off | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #59294 | License | MIT Commits ------- dcf17e6 do not render hidden CSRF token forms with autocomplete set to off
Symfony version(s) affected
7.2.1
Description
this field is auto-generated by symfony:
<input type="hidden" id="message__token" name="message[_token]" data-controller="csrf-protection" autocomplete="off" value="csrf-token" />
this is the error from validator.w3.org:
An input element with a type attribute whose value is hidden must not have an autocomplete attribute whose value is on or off.
How to reproduce
create a simple contact form
Possible Solution
why autocomplete for a hidden field?
Additional Context
No response
The text was updated successfully, but these errors were encountered: