You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #16029 removes the 'action' attribute from a form when the data is empty. This however, is incorrect behaviour according to the HTML specifications, even though URI's according to RFC 2396 section 4.2 states that empty URI's are considered same-document references.
In HTML4, the action attribute is required, yet it might contain an empty URI (and thus references to same-document). This is specified in the HTML4 specification (http://www.w3.org/TR/html4/interact/forms.html#h-17.3), section 17.3.
This is why originally i've added an omit_action option (PR #15995) to the form type: it's not possible to distinguish between a html4 or html5 rendered form, and thus the user must tell explicitly if either A) the action must be added (but should be empty) or B) the action must not be added at all.
The text was updated successfully, but these errors were encountered:
jaytaph
changed the title
Form action breaks in PR #16029
[form] action tag breaks in PR #16029
Oct 1, 2015
I tested it and html4 without an action is supported by all major browsers. The core team agreed to default to valid html5 beginning with symfony 2.8. If you want to validate against html4, just use action='#' or change your form theme. A new option for this is overkill.
Please see the discussion in the original ticket.
PR #16029 removes the 'action' attribute from a form when the data is empty. This however, is incorrect behaviour according to the HTML specifications, even though URI's according to RFC 2396 section 4.2 states that empty URI's are considered same-document references.
In HTML4, the action attribute is required, yet it might contain an empty URI (and thus references to same-document). This is specified in the HTML4 specification (http://www.w3.org/TR/html4/interact/forms.html#h-17.3), section 17.3.
In HTML5 however, the action attribute is optional, but if specified, it must point to a "valid non-empty URL potentially surrounded by spaces".
This was already discussed in issue #13852.
To recap:
This is why originally i've added an
omit_action
option (PR #15995) to the form type: it's not possible to distinguish between a html4 or html5 rendered form, and thus the user must tell explicitly if either A) the action must be added (but should be empty) or B) the action must not be added at all.The text was updated successfully, but these errors were encountered: