Opened 15 years ago
Closed 15 years ago
#12335 closed defect (bug) (fixed)
wpautop() adds pee's around closing tag of HTML 5 block-level element figure
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | low |
Severity: | trivial | Version: | 2.9.2 |
Component: | Formatting | Keywords: | has-patch |
Focuses: | Cc: |
Description
If you add a figure-element into a post, it will only be altered on the last line. The ending tag of a HTML 5 block-level element figure is delivered as <p></figure></p> while the rest of the block is not altered.
I found the line, where block-level elements are listed, and the figure element - as well as other upcoming HTML 5 elements - isn't listed there:
http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L188
Attachments (5)
Change History (13)
#1
@
15 years ago
As you can see (in the second file I uploaded which is generated by pasting the content of the first file) wpautop also assigns a paragraph around the start-tag (<p><figure ...></p>) and not only to the closing one.
My mistake.
#5
@
15 years ago
The elements are: section|article|aside|hgroup|header|footer|nav|figure|details
Attaching patch.
HTML 5 snippet to copy and paste into a post