Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10352 closed Bug (invalid)

double quote (") in element attributes are lost when replacing the textArea by the editor

Reported by: Jeff Fournier Owned by:
Priority: Normal Milestone:
Component: General Version: 4.1
Keywords: Cc:

Description

If you have an image with a title that contains double quote. The string after the first double quote will be lost upon replacing the textArea by the editor.

I have attach the replaceByCode.html sample edited to show the problem. The text in the editor contain the folowing image :

<p>bla blabla <img alt="" style="width: 139px; height: 36px;" src="http://i.msdn.microsoft.com/dynimg/IC600833.png" title="test double quote &quot;test&quot; test">bla bla bla</p>

If you open the image dialog, in the advanced tab, the description will miss the end of the title.

Alos, if you inspect the html in the editor, you will see that the title is truncated.

Attachments (1)

replacebycode.html (1.8 KB) - added by Jeff Fournier 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by Jeff Fournier

Attachment: replacebycode.html added

comment:1 Changed 11 years ago by Piotrek Koszuliński

Resolution: invalid
Status: newclosed

This is not a bug. You should encode entire content of textarea and then &quot; would become a &amp;quot; and it would work correctly.

Remove CKEDITOR.replace call and see how content of real textarea looks like in your sample:

<p>bla blabla <img alt="" style="width: 139px; height: 36px;" src="http://i.msdn.microsoft.com/dynimg/IC600833.png" title="test double quote "test" test">bla bla bla</p>
Last edited 11 years ago by Piotrek Koszuliński (previous) (diff)

comment:2 Changed 11 years ago by Jakub Ś

@Reinmar is right, textaarea contents should be encoded.

Please also note that if you add title like dd "ddd" dddd in Advanced Tab then switch to Source or see it once more in dialog it won't get truncated nor removed.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy