[wp-trac] Re: [WordPress Trac] #7943: Image captions truncated if single quotes are added in the html editor

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 28 10:59:44 GMT 2009


#7943: Image captions truncated if single quotes are added in the html editor
--------------------------+-------------------------------------------------
 Reporter:  designsimply  |        Type:  defect (bug)
   Status:  new           |    Priority:  low         
Milestone:  2.9           |   Component:  Media       
  Version:  2.6           |    Severity:  minor       
 Keywords:  needs-patch   |  
--------------------------+-------------------------------------------------

Comment(by toby lewis):

 The problem is not restricted to the html/visual editor because a caption
 short code with escaped double quotes in the caption parameter appears to
 break the shortcode parser.

 The result of an image inserted with a caption that contains one or more
 double quotes (escaped or not) will be published without the caption div
 or caption paragraph surrounding the html image and link.  Implying the
 shortcode failed to generate any output code.

 Although it would be possible to use "s in the caption text in the
 media library forms, it isn't reasonable to expect normal users to do
 this.

 The solution is to alter the "insert into post" code to convert quotes to
 entities just prior to doing the addslashes.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7943#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list