[wp-trac] [WordPress Trac] #21541: Image caption in the visual editor not integrating proper html code

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 10 17:27:03 UTC 2012


#21541: Image caption in the visual editor not integrating proper html code
--------------------------+------------------------------
 Reporter:  Gouri         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> The image caption that I add in the visual editor is not getting
> integrated properly in the html editor.
>
> When I make corrections in the html editor and update it, it works fine.
>
> But again when I go to the visual editor and save the post, all the
> corrections I made in html editor goes for a toss.
>
> For example,
> '''This is how the code is supposed to be:'''
> [caption id="attachment_1263" align="aligncenter" width="600"
> caption="photo credit: www.flickr.com/photos/tonystanley/399738240/"]<img
> class="wp-image-1263    " title="munnar" src="http://www.traveldest.org
> /wp-content/uploads/munnar.jpg" alt="munnar" width="600" height="398"
> />[/caption]
>
> '''But this is what is inserted by visual editor:'''
> [caption id="attachment_1263" align="aligncenter" width="600"]<img class
> ="wp-image-1263    " title="munnar" src="http://www.traveldest.org/wp-
> content/uploads/munnar.jpg" alt="munnar" width="600" height="398" />
> photo credit: www.flickr.com/photos/tonystanley/399738240/[/caption]

New description:

 The image caption that I add in the visual editor is not getting
 integrated properly in the html editor.

 When I make corrections in the html editor and update it, it works fine.

 But again when I go to the visual editor and save the post, all the
 corrections I made in html editor goes for a toss.

 For example, [[BR]]
 '''This is how the code is supposed to be:'''
 {{{
 [caption id="attachment_1263" align="aligncenter" width="600"
 caption="photo credit: www.flickr.com/photos/tonystanley/399738240/"]<img
 class="wp-image-1263    " title="munnar" src="http://www.traveldest.org
 /wp-content/uploads/munnar.jpg" alt="munnar" width="600" height="398"
 />[/caption]
 }}}

 '''But this is what is inserted by visual editor:'''
 {{{
 [caption id="attachment_1263" align="aligncenter" width="600"]<img class
 ="wp-image-1263    " title="munnar" src="http://www.traveldest.org/wp-
 content/uploads/munnar.jpg" alt="munnar" width="600" height="398" /> photo
 credit: www.flickr.com/photos/tonystanley/399738240/[/caption]
 }}}

--

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


More information about the wp-trac mailing list