Opened 6 months ago
Last modified 6 months ago
#22458 new defect (bug)
Image captions and block level elements
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Media | Version: | 3.4 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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.
Change History (2)
Note: See
TracTickets for help on using
tickets.

If block levels tags aren't supported in captions, can it break consistently? Or with valid html?