WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#19543 closed defect (bug) (fixed)

Broken formatting when using HTML5 <section> element

Reported by: exz Owned by:
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.3
Component: Formatting Keywords:
Focuses: Cc:

Description

When using <section> HTML5 element, the resulting markup is invalid because some paragraphs isn't closed properly.

Reproduced with WP 3.3, TwentyEleven theme and no plugins.

Example markup attached to this ticket. Paste into html view of the WYSIWYG editor and publish. Resulting markup also attached.

Attachments (3)

markup.html (191 bytes) - added by exz 6 years ago.
markup to reproduce the bug
output.html (231 bytes) - added by exz 6 years ago.
resulting output
19543.diff (882 bytes) - added by solarissmoke 6 years ago.

Download all attachments as: .zip

Change History (10)

@exz
6 years ago

markup to reproduce the bug

@exz
6 years ago

resulting output

@solarissmoke
6 years ago

#1 @solarissmoke
6 years ago

  • Component changed from Editor to Formatting
  • Keywords dev-feedback added

19543.diff illustrates where the issue is.

However, the same applies to pretty much all the other block-level elements which can contain flow content - e.g., header, footer, nav etc - where an unclosed paragraph at the end needs to be closed. It's not clear to me why currently only div, form and address get this treatment? The original changeset r4565 doesn't say much either.

#2 @SergeyBiryukov
6 years ago

  • Keywords has-patch needs-unit-tests added

#3 @MikeHansenMe
5 years ago

Here is a list of elements that may need addressed, some are not supported yet.
<article>
<aside>
<command>
<details>
<summary>
<figure>
<figcaption>
<footer>
<header>
<hgroup>
<meter>
<nav>
<ruby>
<rt>
<rp>
<section>
<time>
<video>
<source>
<track>
<canvas>
<datalist>

#4 @MikeHansenMe
5 years ago

See ticket #21173, this will likely fix this problem.

#5 @MikeHansenMe
5 years ago

The problem does not seem to be resolved with the fix of #21173 as I thought it may. Problem still exists exactly as described.

#6 @sabreuse
4 years ago

  • Keywords dev-feedback has-patch needs-unit-tests removed
  • Milestone Awaiting Review deleted
  • Resolution set to fixed
  • Status changed from new to closed

This is no longer happening. I assume it was fixed by the TinyMCE HTML5 overhaul in [23153]

#7 @nacin
4 years ago

  • Milestone set to 3.5
Note: See TracTickets for help on using tickets.