#37328 closed defect (bug) (duplicate)
Empty <p> tag inside <figure> markup
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
<figure> <img src="image.png" alt=""> <figcaption>Caption</figcaption> </figure>
Using the above markup in the form at Posts > Add New results in an empty <p>
tag being output. For example:
<figure> <img src="image.png" alt=""><p></p> <figcaption>Caption</figcaption> </figure>
Interesting, if I remove all whitespace from the markup I enter in the post form:
<figure><img src="image.png" alt=""><figcaption>Caption</figcaption></figure>
... I get a <br>
tag instead of the <p></p>
:
<figure><img src="image.png" alt=""><br> <figcaption>Caption</figcaption> </figure>
I believe the empty <p>
is a bug with wpautop()
.
Change History (5)
#2
in reply to:
↑ 1
@
8 years ago
Replying to lukecavanagh:
So what happens if you disable the wpautop filter?
The problem doesn't happen when the filter is disabled.
Note: See
TracTickets for help on using
tickets.
@henry.wright
So what happens if you disable the wpautop filter?
https://codex.wordpress.org/Function_Reference/wpautop