Opened 17 years ago

Closed 17 years ago

#438 closed Bug (invalid)

Reconstituting > entity when re-parsing output

Reported by: Peter Davis Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.4.2
Keywords: Cc:

Description

Given a line in the editor :-

The equation small<big

The editor will correctly convert the < to an entity &gt; if this line is then re-parsed by the editor, as in a wiki, when the above page is edited, the entity is reconstituted where the document incorrectly becomes

The equation small

The source editor reveals that the following has occurred

<p>The equation small</p> <p><big></big></p>

Change History (5)

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Keywords: Pending WorksForMe added; wiki removed
Milestone: FCKeditor 2.4.3
Priority: HighNormal

Could you please give detailed steps to reproduce?
Could it be just a problem in your integration?

comment:2 in reply to:  1 ; Changed 17 years ago by Peter Davis

Replying to alfonsoml:

Could you please give detailed steps to reproduce?
Could it be just a problem in your integration?

The problem can be reproduced using _samples/html/example02.html.

With a text editor, edit the textarea to read

small&lt;large

Then try

small &lt; large

In the first example "large" vanishes.

comment:3 in reply to:  2 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Replying to fsdev:

The problem can be reproduced using _samples/html/example02.html.

With a text editor, edit the textarea to read

small&lt;large

That's wrong, the proper escaping for a textarea would be small&amp;gt;large.

comment:4 Changed 17 years ago by Peter Davis

Does this apply to all entities or just > and <

comment:5 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Keywords: Pending WorksForMe removed
Resolution: invalid
Status: newclosed

You have to escape the content in a textarea, and every server language will have the proper call that takes care of all the issues.

If you don't escape then if the content has the html "</textarea>" then that would close the textarea ahead of time. So you have to escape < and > but you must also escape & because of the problem that you had: the browser thinks that your &gt; is an escaped >

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