-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DomCrawler] exclude fields inside "template" tags #28147
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
Conversation
Could you elaborate on why it's better? |
In this case it represents browser's behavior - element is accessible (e.g. by JS), but server will not get values on form submit. (if I understand right that |
The way this is currently implemented could be understood as a new feature because it's adding a new method. If we can do without the new method, that'd be better to qualify as bugfix.
Shouldn't the |
this should indeed be implemented when populating the list of fields, as the form in the DOM does not have this field in this case in a browser. It is not only about the submission skipping the values. |
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.
(implementation updated to filter fields inside <template>
using xpath)
Tests should also be updated to test that the Form does not contain the corresponding field at all ( |
@stof test added |
Thank you @Gorjunov. |
This PR was merged into the 2.8 branch. Discussion ---------- [DomCrawler] exclude fields inside "template" tags | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #27285 | License | MIT | Doc PR | Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket #27285) Commits ------- 19e3e15 [DomCrawler] exclude fields inside "template" tags
Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket #27285)