Opened 8 years ago
Closed 8 years ago
#14846 closed Bug (invalid)
ckeditor inserts hidden characters into HTML when using soft return (shift-return). Hex codes: E2 80 8B
Reported by: | Vern Jensen | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Editable | Version: | |
Keywords: | Cc: |
Description
When using shift-return to add a soft return to ckeditor (tested on both versions 4.5.3 and the latest 4.5.10), there are hidden characters that are inserted. Their hex codes are:
E2 80 8B
If you insert many soft returns, these hidden characters tend to 'bunch up' all on one line. For instance, if I type the following all with soft returns between each:
asdf sdfg dfgh fghj
then the following hidden hex codes will be inserted after the *last* line (after "fghj"):
E2 80 8B E2 80 8B E2 80 8B E2 80 8B
(i.e. E2 80 8B repeated 4x, one for each soft return)
To duplicate:
1) Go to the online ckeditor demo: http://ckeditor.com/demo
2) Type a few characters (like "asdf") on several lines, using shift-return to do a soft return between each line.
3) Click on the "Source" button to view the HTML. Select and copy an area large enough to more than fully contain the area you typed (make sure to copy a little extra *below* what you typed). Then paste it into a hex editor. There is one online at:
You will see the same hex codes:
E2 80 8B
have been added as strange characters, one set for every soft return.
OS: Windows 7 Browser: Chromium (also same behavior duplicated in Qt's WebEngine, which uses the same source as Chrome)
Change History (6)
comment:1 Changed 8 years ago by
Status: | new → pending |
---|---|
Version: | 4.5.11 |
comment:3 Changed 8 years ago by
- I tried in Chrome and couldn't reproduce, so I tried again in Chromium... and now can't reproduce there either!! This issue IS real... but I'm not sure what's different about conditions now vs. a couple days ago. I'm doing the exact same steps.
- Do you mean a plain <textarea> element? (contenteditable is an attribute... and can be applied to any element... but perhaps that's what you meant?)
comment:4 Changed 8 years ago by
Also, based on the link to ticket 10031, this IS a bug -- because apparently the ZWS character is supposed to NOT be included when you get output from ckeditor using
editor.document.getBody().getHtml();
(or should I be using getData() instead?)
comment:5 Changed 8 years ago by
(or should I be using getData() instead?)
Yes, innerHTML !== data. There are more difference between them – especially when you use widgets. So the only way to get a clean data is through editor.getData()
.
comment:6 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Please see this link - http://docs.ckeditor.com/#!/guide/dev_browsers
We support Chrome not Chromium. Anyway I have tried reproducing this issue in Chromium on Linux and Chrome on Windows and everything seems to be fine. These codes were not entered.
How are you getting data from editor? Are you using
editor.getData()
or something else?