Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14777 closed Bug (invalid)

Text is truncated when 'Less Than' symbol is used in table cell

Reported by: mgrimm67 Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

It appears that "<" symbols are not being handled correctly by the editor, and may be interpreted as HTML tags when directly adjacent to another character and within a table cell. When I type "250<MBH" into a table cell, the editor does not recognize the string as text, and truncates it to "250". If I type "250 < MBH" into a table cell, the string is formatted correctly.

Steps to reproduce

  1. Click the 'Edit' button to open the editor
  2. Insert a table using the Table button
  3. Type "250<MBH" into a table cell
  4. Click the 'Save' button

Expected result

The string appearing in the table should be "250<MBH"

Actual result

The string appearing in the table is "250"

Other details (browser, OS, CKEditor version, installed plugins)

Attachments (2)

Less Than Character Issue.png (148.0 KB) - added by mgrimm67 8 years ago.
LessThan_Character_Issue_2016-12-06_1159.swf (1.5 MB) - added by mgrimm67 8 years ago.
video

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by mgrimm67

Update: It does not matter if the string is in a table or not. The issue still occurs.

comment:2 Changed 8 years ago by Jakub Ś

Component: Core : TablesGeneral
Resolution: invalid
Status: newclosed
Version: 4.5.10 (GitHub - master)

CKEditor has nothing to do with saving data. This is JS application.

If you are able to reproduce this by inserting 250<MBH in wysiwyg mode and then switching modes wysiwyg->source->wysiwyg, this can be considered CKEditor issue. I have checked this test case however and it works as expected. I would rather assume there is some filter on your server-side which filters that part out.

I'm closing the ticket but if you don't agree please leave a comment.

comment:3 Changed 8 years ago by mgrimm67

Hi, sorry it took so long for me to get back to this ticket. The issue occurs even through switching modes wsiwyg -> source -> wysiwyg. Everything looks good until I refresh the page. I have a video that demonstrates the issue. Can I upload it here? I don't see a way to do that.

comment:4 Changed 8 years ago by Jakub Ś

The issue occurs even through switching modes wsiwyg -> source -> wysiwyg. Everything

looks good until I refresh the page. I don't understand. Is <MBH removed when you switch to source mode and back or everything looks good and then you refresh the page (you reload the content)?

Are you able to reproduce this issue in default online sample - http://sdk.ckeditor.com/samples/classic.html ? I have tried clearing editor contents, inserting table, inserting 250<MBH and switching to source mode and back. Everything is working as expected.

Changed 8 years ago by mgrimm67

Changed 8 years ago by mgrimm67

video

comment:5 Changed 8 years ago by mgrimm67

Steps to reproduce:

Step 1: Expand Section, then click 'Edit' button.

Step 2: Type text ("250<300"). Text looks good. Then click 'Source' button to view source.

Step 3: Click 'Source' button again to view WSIWYG. Text looks good.

Step 4: Click 'Save' button to save. Text looks good.

Step 5: Refresh page using browser Refresh button. Section collapses.

Step 6: Expand Section. The "<300" text is now missing.

I've attached an image file with a series of screenshots illustrating what's happening. The issue may be related to our use of expandable / collapsible sections on the page.

Last edited 8 years ago by mgrimm67 (previous) (diff)

comment:6 Changed 8 years ago by Jakub Ś

Thank you for providing images. This problem is not related to CKEditor but rather to your server-side or how data is loaded into editor.

When you switch to source from wysiwyg, the < gets changed to entity &lt; which is correct behavior and compatible with default configuration. This proves that < is not removed by the editor.

You should rather check if < is in data base. If it is not, it is removed by the server-side. If it is available in data base, please check how CKEditor is initialized with HTML code. Such code should be encoded. Please see e.g. ckeditor/amples/old/replacebycode.html to see how encoded HTML should look like.

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