[wp-trac] [WordPress Trac] #22135: Special characters in caption lead to failure of inserting images

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 8 21:25:46 UTC 2012


#22135: Special characters in caption lead to failure of inserting images
-----------------------------+--------------------------
 Reporter:  TobiasBg         |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Media
  Version:  3.4.2            |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 Found this when double-checking #22132:

 1. Go to add a new post.
 2. Click "Upload/Insert" (the "old" media upload).
 3. Upload an image, or go to choose one from the media library.
 4. Insert {{{Title"<script>alert('Title');</script>}}} in the "Caption"
 field.
 5. Click "Insert into Post".

 Instead of the image (or Shortcode) being added to the editor (with a
 somehow escaped caption field), the media upload iframe just gets a new
 content:
 {{{
 [/caption]'); /* ]]> */
 }}}

 Reproduced in 3.4.2 and trunk.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22135>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list