#2315: FCKeditor.Net 2.5 gives wrong output
-----------------------------------+----------------------------------------
 Reporter:  Luca Leonardo Scorcia  |        Type:  Bug             
   Status:  new                    |    Priority:  Normal          
Milestone:                         |   Component:  Server : ASP.Net
  Version:  FCKeditor 2.6.1        |    Keywords:                  
-----------------------------------+----------------------------------------
 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
 />&lt;code&gt;lol&lt;/code&gt;"
 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("&amp;", "&");
 postedValue = postedValue.Replace( "&lt;", "<" ) ;
 postedValue = postedValue.Replace( "&gt;", ">" ) ;

 should be instead:

 postedValue = postedValue.Replace( "&lt;", "<" ) ;
 postedValue = postedValue.Replace( "&gt;", ">" ) ;
 postedValue = postedValue.Replace("&amp;", "&");

 This way, the &amp;lt; will be correctly interpreted.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2315>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to