[wp-trac] [WordPress Trac] #12097: Inserting image captions sometimes results in malformed HTML
WordPress Trac
wp-trac at lists.automattic.com
Sat Aug 13 11:07:32 UTC 2011
#12097: Inserting image captions sometimes results in malformed HTML
--------------------------+-----------------------------
Reporter: essday | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version: 2.9.1
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------------
Comment (by davehope):
I also encountered this problem if a line break in not inserted before the
caption/image. Wordpress generates some code like this:
{{{
Consider the below photo taken in center-weighted metering mode.
[caption id="attachment_223" align="aligncenter" width="500" caption
="Center-weighted metering sample"]<img src="http://slrschool.net/wp-
content/uploads/2011/08/Center-Weighted-Metering.jpg" alt="Center-weighted
metering sample" title="Center-Weighted Metering" width="500" height="331"
class="size-full wp-image-223" />[/caption]
}}}
Which results in a <p> tag, my text followed by a <br/> tag and then the
<div> etc.
By adding a line break after by text, before the [caption..] the xhtml is
not malformed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12097#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list