Opened 5 years ago

Closed 5 years ago

#11855 closed Bug (invalid)

the problem of parsing angle brackets(<>) after transferred by ckeditor

Reported by: aang Owned by:
Priority: Normal Milestone:
Component: Accessibility Version:
Keywords: Cc:

Description

1.the version of my ckeditor is ckeditor_4.3.4_full;
2.when I put some angle brackets(<>) in textarea, the ckeditor cannot parse it if there are not a blank space around it.

example:
(1) nothing happened in ckeditor.
<textarea name="editor1" id="editor1">
<p>&lt;hello!&gt;</p>
</textarea>

(2)will be showed correctly.(notice the space around hello!)
<textarea name="editor1" id="editor1">
<p>&lt; hello! &gt;</p>
</textarea>

Change History (1)

comment:1 Changed 5 years ago by Piotrek Koszuliński

Keywords: angle brackets removed
Resolution: invalid
Status: newclosed
Version: 4.3.4

When you have in your page:

<textarea name="editor1" id="editor1">
<p>&lt;hello!&gt;</p>
</textarea>

The browser says that the value of textarea is:

<p><hello!></p>

As you can see - it's an invalid HTML. Therefore CKEditor cannot load it. To prevent that you need to encode entire editor content before passing it to HTML:

<textarea name="editor1" id="editor1">
&lt;p&gt;&amp;lt;hello!&amp;gt;&lt;/p&gt;
</textarea>
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy