Opened 17 years ago
Closed 16 years ago
#2315 closed Bug (duplicate)
FCKeditor.Net 2.5 gives wrong output
Reported by: | Luca Leonardo Scorcia | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Server : ASP.Net | Version: | FCKeditor 2.6.1 |
Keywords: | Cc: |
Description (last modified by )
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.
Change History (2)
comment:1 Changed 17 years ago by
comment:2 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
dup of #1908
Oh well, the editor ate some line breaks. Hope you'll be able to understand what I wrote, in case let me know and I'll post a .txt file somewhere.