[wp-trac] [WordPress Trac] #22458: Image captions and block level elements
WordPress Trac
noreply at wordpress.org
Thu Nov 15 03:16:19 UTC 2012
#22458: Image captions and block level elements
-----------------------------+--------------------------
Reporter: trepmal | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: | Severity: normal
Keywords: |
-----------------------------+--------------------------
After accidentally putting a captioned image inside another image's
caption (yo dawg), I found that block level elements in general seem to
not play well.
{{{
[caption id="attachment_809" width="150" align="alignnone"]<a
href="#"><img width="150" height="150"
src="http://colorto.me/png/150/rand" class="size-thumbnail wp-image-809"
/></a> tree<p>block level in caption</p>[/caption]
}}}
With `<p>` tag: Toggling about 3 times completely removes the tag,
contents remain
{{{
[caption id="attachment_809" width="150" align="alignnone"]<a
href="#"><img width="150" height="150"
src="http://colorto.me/png/150/rand" class="size-thumbnail wp-image-809"
/></a> tree<div>block level in caption</div>[/caption]
}}}
With `<div>` tag: Toggling about 2 times causes the entire caption to be
removed, after first adding some unbalanced `<dd>` and `<dl>` after the
first toggle
{{{
[caption id="attachment_809" width="150" align="alignnone"]<a
href="#"><img width="150" height="150"
src="http://colorto.me/png/150/rand" class="size-thumbnail wp-image-809"
/></a> tree<ul><li>block level in caption</li></ul>[/caption]
}}}
With `<ul><li>` tags: First toggle will 'organize' your list tags, each
toggle after that adds 2 `<br />` tags and wraps an extra `<ul>` around
the list.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22458>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list