[wp-trac] [WordPress Trac] #22459: Inserting captionless and captioned image together causes shortcode to appear in visual mode
WordPress Trac
noreply at wordpress.org
Mon Nov 19 06:18:13 UTC 2012
#22459: Inserting captionless and captioned image together causes shortcode to
appear in visual mode
--------------------------+--------------------
Reporter: trepmal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+--------------------
Changes (by koopersmith):
* keywords: => needs-patch
Comment:
The `wpeditimage` plugin searches for captions by checking if the inserted
string begins with `[caption`. With multiple images, we're inserting a
single string, which is causing the issue here. Instead, we should be
inserting multiple strings.
This can be fixed by going into `media-upload.js` and changing the insert
event callback to use `each` instead of `map`, and moving the call to
`insert` into the loop.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22459#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list