#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
- Click the 'Edit' button to open the editor
- Insert a table using the Table button
- Type "250<MBH" into a table cell
- 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)
Change History (8)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Component: | Core : Tables → General |
---|---|
Resolution: | → invalid |
Status: | new → closed |
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
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
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
Attachment: | Less Than Character Issue.png added |
---|
comment:5 Changed 8 years ago by
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.
comment:6 Changed 8 years ago by
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 <
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.
Update: It does not matter if the string is in a table or not. The issue still occurs.