Opened 11 years ago

Last modified 8 years ago

#10031 closed Bug

CKEditor injects special character in Chrome — at Version 8

Reported by: Jared Cobb Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.5
Keywords: Blink Cc:

Description (last modified by Jakub Ś)

Under a special circumstance I'm seeing that Chrome is injecting a special character (​) which is a zero width space character. I stumbled upon this while playing with the editor in our production app. But I created a jsfiddle that replicates the issue with instructions on how to reproduce in the jsfiddle example:

http://jsfiddle.net/J669P/1/


Edit:

I just go to http://ckeditor.com/demo delete all contents then type some characters press Shift+Enter and type some more characters.

Don't press Backspace or Delete when you type as this will remove ZWS. To check ZWS I use Chrome dev tools / elements tab. It is important to use Chrome because ZWS is only created when CKEDITOR.env.webkit is TRUE.

Change History (4)

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

If it's a ZWS character, then most likely we're creating it. It may be Webkit specific, because of some hack targeted for Webkit only.

comment:5 Changed 11 years ago by Jared Cobb

I completely forgot to come back and follow up, I apologize. The issue is actually seen once we save the content. I'm using getData() to get the contents, and when it's saved into the database and rendered out we get the special character. In general, I'm doing this:

$('#submit').on('click', function() {
    var editor = CKEDITOR.instances['comment'];
    var content = editor.getData();
    
    // save my stuff via an ajax call
    // now my data has special characters
});

comment:7 Changed 10 years ago by Gerbus

For me, this character is inserted (chrome) when an <img> is not contained within a <p>

comment:8 Changed 10 years ago by Jakub Ś

Description: modified (diff)
Keywords: Blink added
Status: newconfirmed
Version: 4.0.13.6.5

Problem can be reproduced in Blink from CKEditor 3.6.5 rev. [7633] which was a fix for rev. [7624].

NOTE: I wasn't able to reproduce this problem in any Safari

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