WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#21018 closed defect (bug) (fixed)

get_the_password_form() inserting two </p> before the </form> causing W3C validation error

Reported by: kevinhaig Owned by: nacin
Milestone: 3.4.1 Priority: normal
Severity: normal Version: 3.4
Component: Formatting Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

In the get_the Password_form()code at the end of the function :

esc_attr__("Submit") . '" /></p>
</form>
';

should be

esc_attr__("Submit") . '" /></p></form>';

Attachments (1)

21018.diff (966 bytes) - added by duck_ 6 years ago.

Download all attachments as: .zip

Change History (7)

#1 follow-up: @duck_
6 years ago

  • Keywords has-patch added

I thought that we had fixed this in #16456.

After some quick investigation it appears that the problem is that the spacing before the closing </form> tag is being captured in paragraph tags. Removing <p> tags from around block-level elements first fixes this. However, it will need a lot more testing.

@duck_
6 years ago

#2 @SergeyBiryukov
6 years ago

  • Component changed from General to Formatting
  • Keywords needs-unit-tests added

#3 @nacin
6 years ago

Let's remove the extra tab before </form> to fix this in the 3.4 branch. We can look into wpautop() in 3.5, with unit tests.

#4 @nacin
6 years ago

In [21124]:

Fix validation issue in get_the_password_form() caused by wpautop(). see #21018 for trunk.

#5 @nacin
6 years ago

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

In [21125]:

Fix validation issue in get_the_password_form() caused by wpautop(). fixes #21018 for 3.4.

#6 in reply to: ↑ 1 @nacin
6 years ago

  • Milestone changed from Awaiting Review to 3.4.1

Replying to duck_:

I thought that we had fixed this in #16456.

After some quick investigation it appears that the problem is that the spacing before the closing </form> tag is being captured in paragraph tags. Removing <p> tags from around block-level elements first fixes this. However, it will need a lot more testing.

Not entirely sure the best way to turn this into a bug report. duck_, can you open a new ticket for 3.5?

Note: See TracTickets for help on using tickets.