Skip to content

[form] action tag breaks in PR #16029 #16038

Closed
@jaytaph

Description

@jaytaph

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:

attribute html4 html5
yes yes
yes no
no yes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions