Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#30126 closed defect (bug) (fixed)

Empty form action attributes (action="") are invalid in HTML5.

Reported by: jdgrimes's profile jdgrimes Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: General Keywords: has-patch
Focuses: Cc:

Description

There are quite a few forms in core which have an empty action attribute. This isn't valid in HTML5. The HTML5 spec permits them to be removed entirely, but discourages leaving them empty.

This might make a good first bug.

Attachments (3)

30126.diff (18.6 KB) - added by voldemortensen 9 years ago.
30126.widgets.png (96.0 KB) - added by SergeyBiryukov 8 years ago.
30126.widgets.patch (527 bytes) - added by SergeyBiryukov 8 years ago.

Download all attachments as: .zip

Change History (8)

@voldemortensen
9 years ago

#1 @voldemortensen
9 years ago

  • Keywords has-patch added

Removed all empty action attributes.

#2 @wonderboymusic
8 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @wonderboymusic
8 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 31200:

In HTML5, the action attribute is no longer required. Remove this attribute when empty.

The admin HTML is served with the HTML5 doctype.

"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces."
http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-action

Props voldemortensen.
Fixes #30126.

#4 @SergeyBiryukov
8 years ago

[31200] broke adding widgets via Customizer: 30126.widgets.png.

There's a closing </div> for an opening <form> in each widget's control template.

#5 @SergeyBiryukov
8 years ago

In 31226:

Customizer: Fix form tag replacement in WP_Customize_Widgets::get_widget_control() after [31200].

see #30126.

Note: See TracTickets for help on using tickets.