#2315: FCKeditor.Net 2.5 gives wrong output
------------------------------------+---------------------------------------
Reporter: Luca Leonardo Scorcia | Owner:
Type: Bug | Status: closed
Priority: Normal | Milestone:
Component: Server : ASP.Net | Version: FCKeditor 2.6.1
Resolution: duplicate | Keywords:
------------------------------------+---------------------------------------
Changes (by alfonsoml):
* status: new => closed
* resolution: => duplicate
Old description:
> If the text typed in the editor contains html codes (like in a HTML
> tutorial) the content of ctlEditor.Value is messed up.
>
> To reproduce, type into the editor the following lines:
>
> How to format source code:
> <code>lol</code>
>
> Submit and check the Value property.
> Expected result: "How to format source code:<br
> /><code>lol</code>"
> Actual result: "How to format source code:<br /><code>lol</code>"
>
> This bug makes impossible to display html codes.
>
> The reason is an error in the FCKeditor.LoadPostData method; the lines
>
> postedValue = postedValue.Replace("&", "&");
> postedValue = postedValue.Replace( "<", "<" ) ;
> postedValue = postedValue.Replace( ">", ">" ) ;
>
> should be instead:
>
> postedValue = postedValue.Replace( "<", "<" ) ;
> postedValue = postedValue.Replace( ">", ">" ) ;
> postedValue = postedValue.Replace("&", "&");
>
> This way, the &lt; will be correctly interpreted.
New description:
If the text typed in the editor contains html codes (like in a HTML
tutorial) the content of ctlEditor.Value is messed up.
To reproduce, type into the editor the following lines:
How to format source code:
<code>lol</code>
Submit and check the Value property.
Expected result: "How to format source code:<br
/><code>lol</code>"
Actual result: "How to format source code:<br /><code>lol</code>"
This bug makes impossible to display html codes.
The reason is an error in the FCKeditor.LoadPostData method; the lines
{{{
postedValue = postedValue.Replace("&", "&");
postedValue = postedValue.Replace( "<", "<" ) ;
postedValue = postedValue.Replace( ">", ">" ) ;
}}}
should be instead:
{{{
postedValue = postedValue.Replace( "<", "<" ) ;
postedValue = postedValue.Replace( ">", ">" ) ;
postedValue = postedValue.Replace("&", "&");
}}}
This way, the &lt; will be correctly interpreted.
--
Comment:
dup of #1908
--
Ticket URL: <http://dev.fckeditor.net/ticket/2315#comment:2>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac