[wp-trac] [WordPress Trac] #10455: Multiple adjacent [caption] tags in post body produce incorrect output
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 21 05:33:37 UTC 2009
#10455: Multiple adjacent [caption] tags in post body produce incorrect output
--------------------------+-------------------------------------------------
Reporter: essday | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Unassigned
Component: Media | Version: 2.8.1
Severity: normal | Keywords: caption, image
--------------------------+-------------------------------------------------
Somewhere between WP 2.7.1 and 2.8.1, the support for multiple adjacent
"[caption]" tags in a post body became broken.
For example, I could enter the following code into the post textbox when
creating a post in 2.7.x:
{{{
[caption id="attachment_437" align="alignnone" width="100"
caption="DESCRIPTION OF MY FIRST IMAGE HERE"]<a
href="(...)Img_001.jpg"><img src="(...)Img_001-100x150.jpg"
alt="DESCRIPTION OF MY FIRST IMAGE HERE" title="DESCRIPTION OF MY FIRST
IMAGE HERE" width="100" height="150" class="size-thumbnail wp-image-437"
/></a>[/caption][caption id="attachment_435" align="alignnone" width="100"
caption="DESCRIPTION OF MY SECOND IMAGE HERE"]<a
href="(...)Img_002.jpg"><img src="(...)Img_002.jpg" alt="DESCRIPTION OF MY
SECOND IMAGE HERE" title="DESCRIPTION OF MY SECOND IMAGE HERE" width="100"
height="150" class="size-thumbnail wp-image-435" /></a>[/caption]
}}}
In 2.7.x, this outputs two DIV sections, each containing the appropriate
image and corresponding caption.
Under 2.8.x, the first DIV section (containing Img_001) is output
properly, but the entire caption block for the section caption (with
Img_002) is output as plaintext in the post (including the literal text
"[caption]") and no fancy DIV is output for this section.
This issue seemingly corrects itself if one inserts a space between the
first "/caption" closing tag and the subsequent "caption" opening tag.
For the original message thread, see
http://wordpress.org/support/topic/291369.
(Please excuse the lack of wordwrap in this issue--I couldn't figure out
how to keep Trac from mangling the excerpt above without sticking it in a
code block, but then everything else in the post gets un-wordwrapped.)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10455>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list