Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#30126 closed defect (bug) (fixed)

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

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

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 12 years ago.
30126.widgets.png (96.0 KB ) - added by SergeyBiryukov 12 years ago.
30126.widgets.patch (527 bytes ) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (8)

#1 @voldemortensen
12 years ago

  • Keywords has-patch added

Removed all empty action attributes.

#2 @wonderboymusic
12 years ago

  • Milestone Awaiting Review4.2

#3 @wonderboymusic
12 years ago

  • Owner set to wonderboymusic
  • Resolutionfixed
  • Status newclosed

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
12 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
12 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.