Opened 11 years ago
Closed 11 years ago
#11494 closed Bug (invalid)
Incorrect handling of gt/lt-masked braces at editor load
Reported by: | jhacker | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Summary: Text from an textarea, that is interpreted by CKEditor is removed, if it is between an < and >. Instead, the < and > should be interpreted and displayed as < and >
Setup:
- CKEditor 4.3.2 Standard package with default configuration
- Firefox 24.1.0
- Windows 7
Situation: CKEditor is loaded onto page, that reads a database entry into a textarea. The entries possibly contain some normal HTML tags on purpose. Furthermore there are some braces in the text, which belong to the text itself and are masked with the corresponding HTML entities lt/gt.
While inserting text, CKEditor maskes the braces correctly and writes them to the textarea. Consequently they are written to the database correctly. E. g. the text "select <column> from <table>" is being converted to "select <column> from <table>".
However, as soon as the database entry is loaded to be edited, it comes to the problem, that CKEditor detects the text enclosed in the lt/gt-braces inside the textarea and just removes it. E. g. if the text given above is found, CKEditor interprets it as "select from" and just removes <column> and <table>
Expected behaviour: Text mustn't be removed. Instead, < and > have to be displayed as < and >.
Change History (1)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.3.2 |
It's how HTML works. Note that this:
Will alert
"<"
, not"<"
.So before setting content of textarea in HTML, you need to encode your data, so
<
becomes&lt;
.