This is a migrated thread and some comments may be shown as answers.

Encoding asp tags

2 Answers 103 Views
Editor
This is a migrated thread and some comments may be shown as answers.
AbsolutelyN
Top achievements
Rank 1
AbsolutelyN asked on 16 Jun 2008, 03:55 PM
Hi

I want to be able to add some asp tags into the text editor but when I save the text it encodes the greater than and less than symbols. 

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

becomes:

&lt;%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %&gt;

Is there a option to prevent this or do I need to fix the string when I save it?

Thanks
Tristan

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Jun 2008, 04:25 PM
Hi Tristan,

RadEditor is a HTML/XHTML editor. It relies/depends on the underlying browser rich-editing engine, and it does not support editing XML. While you can use some hacks to make the content look prettier (e.g. wrap the XML in a <PRE> tag, and others), we do not recommend trying to use RadEditor as an XML editor.

 You can also test all DHTML editors in Firefox and you will notice that the browser automatically encodes the XML tags like
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
to
&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;

 That is why we strongly discourage you to edit full ASPX pages, because the editor is not an XML editor, but a XHTML/HTML editor.


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
AbsolutelyN
Top achievements
Rank 1
answered on 16 Jun 2008, 04:29 PM
Many thanks, Tristan
Tags
Editor
Asked by
AbsolutelyN
Top achievements
Rank 1
Answers by
Rumen
Telerik team
AbsolutelyN
Top achievements
Rank 1
Share this question
or