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

[Solved] <html> is not preserved

1 Answer 117 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Roland Klug
Top achievements
Rank 1
Roland Klug asked on 21 May 2013, 01:19 PM
Hi support team,

I paste the following text into a radeditor instance running in html mode:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
</head>
<body>
</body>
</html>


Then I change to design mode and back to html mode. After that the html looks like this:

&lt;html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"&gt;
<head>
</head>
<body>
</body>
</html>

"<html" is modified to "&lt;html" and ">" is modified to "&gt". Why? By this behaviour I produce a lot of wrongly encoded html documents. What can I do to preserve the html tags for getting a "normal" html document?

When I paste e.g.

<div style="font-family: Arial; font-size: 10pt;"></div>

nothing is modified, i.e. the tags are preserved as expected.

The following filters are disabled:

this.RadEditor1.DisableFilter(EditorFilters.ConvertFontToSpan | EditorFilters.ConvertToXhtml);

I'm using Telerik.Web.UI.dll version 2013.1.417.35 and I observe the descibed behaviour in both Chrome version 26.0.1410.64 m and Firefox version 21.0.

Any help would be very appreciated.
Thanks in advance.

Best regards,
Christian Klug

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 May 2013, 02:40 PM
Hello Christian,

Your support ticket on the matter has been replied and I am pasting the information here as well to make it available to the community:


The following demo shows what are the RadEditor capabilities for editing a full page: http://demos.telerik.com/aspnet-ajax/editor/examples/completehtmlsupport/defaultcs.aspx. This is done through the dialog that generates the needed tags and such custom attributes are not supported.

I would also advise testing our online demos to see the current behavior of the control with the latest version (or upgrade your test project to the latest version to see if it will fit your needs better). My tests in Firefox and IE in the above demo left the brackets unencoded, but IE removed some of the attributes. It is possible that this is behavior that comes from the browser and not from our code, yet I cannot confirm it at this point.

If you are still not satisfied with the handing of the custom attributes the current version offers I would advise that you post your feature request in our feedback portal . Having a clear explanation of the expected results, expected input and the scenario this should handle would help in determining the task. Also, other people will be able to see, comment and vote on the idea in order to raise its priority.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Roland Klug
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or