[wp-trac] [WordPress Trac] #25646: Paragraph and linebreak elements get added when using figure, a, img and figcaption
WordPress Trac
noreply at wordpress.org
Mon Oct 21 11:11:23 UTC 2013
#25646: Paragraph and linebreak elements get added when using figure, a, img and
figcaption
--------------------------+-----------------------------
Reporter: laacz | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 3.6.1
Severity: normal | Keywords:
--------------------------+-----------------------------
Tested against clean Wordpress 3.6.1 with default theme. Result can be
seen here: http://dev.laacz.lv/wp-vanilla/?p=4 and in provided attachment.
When composing entry in "text" mode, following generates invalid (or
unwanted) markup.
Post content:
{{{
#!xml
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" />
<figcaption>Test figure with a test caption (linebreak after
<img/>)</figcaption>
</figure>
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" /><figcaption>Test figure with a
test caption (no linebreak after <img/>)</figcaption>
</figure>
}}}
Generated markup (note invalid </p> and unwanted <br/>):
{{{
#!xml
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" /></p>
<figcaption>Test figure with a test caption (linebreak after
<img/>)</figcaption>
</figure>
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" /><br />
<figcaption>Test figure with a test caption (no linebreak after
<img/>)</figcaption>
</figure>
}}}
Expected output:
{{{
#!xml
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" />
<figcaption>Test figure with a test caption (linebreak after
<img/>)</figcaption>
</figure>
<figure>
<img src="http://dev.laacz.lv/wp-vanilla/wp-
content/uploads/2013/10/figcaption.jpg" /><figcaption>Test figure with a
test caption (no linebreak after <img/>)</figcaption>
</figure>
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25646>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list