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

[Solved] Radeditor Modifying HTML in Firefox

3 Answers 107 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Amey
Top achievements
Rank 1
Amey asked on 09 Mar 2010, 06:01 PM
Hello,

We are currently using Editor V 2009.3.1314.35.

We have two scenarios where the editor is modifying our HTML in unexpected ways.

First we are seeing align="left" become float:left as well as adding a "border-style:solid" where there previously was none.  This happens in Firefox and IE.

Example:
<img src="http://www.infocuslists.com/enewsimages/potofgold.gif" alt="Pot of Gold at the End of the Rainbow" border="none" align="left" style="margin:0;"/> 

Becomes:
<img style="border-style: solid; margin: 0pt; float: left;" alt="Pot of Gold at the End of the Rainbow" src="http://www.infocuslists.com/enewsimages/potofgold.gif" /> 


We are also seeing borders being stripped out, this one only happens in Firefox only.

Example:
<div style="border-style: solid; border-color: #dee4e7; border-width: 5px 1px 1px; margin: 0px 0px 15px; padding-left: 6px; padding-right: 4px; background-color: #f9f9f7;"

Becomes:
<div style="margin: 0px 0px 15px; padding-left: 6px; padding-right: 4px; background-color: #f9f9f7;"

These both became an issue when upgrading to the current version of the RadEditor we are using.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Mar 2010, 09:07 AM
Hi Christian,

Straight to the points:
1) The align="left" attribute is converted to the XHTML compliant float:left attribute by the ConvertToXhtml filter of RadEditor.
The border attribute does not offer a none value. If you set it to 0, you will not experience the problem.

If you disable the ConvertToXhtml filter you should not experience the validation and conversion of HTML to XHTML content.

2) I was unable to reproduce the problem with Q1 2010 of RadControls for ASP.NET AJAX. Can you please test the demo and let me know if you are able to reproduce the problem:
http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

Kind regards,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Amey
Top achievements
Rank 1
answered on 15 Mar 2010, 04:21 PM
Hi Rumen,

Understand re: #1.

Here is a better example re: #2.  

This:
<div style="border-style: solid; border-color: #dee4e7; border-width: 5px 1px 1px 1px; margin: 0px 0px 15px; padding-left: 6px; padding-right: 5px; background-color: #f9f9f7;">TEST TEST TEST TEST TEST TEST TEST TEST</div> 

Becomes This:
<div style="margin: 0px 0px 15px; padding-left: 6px; padding-right: 5px; background-color: #f9f9f7;">TEST TEST TEST TEST TEST TEST TEST TEST</div> 

You can replicate by going to the demo editor in Firefox:
http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx

paste in the example, switch to design view, then switch to html, then switch to design, then back to html view.

Thanks


0
Rumen
Telerik team
answered on 16 Mar 2010, 04:45 PM
Hi,

Thank you for the detailed description and reproduction steps!

I was able to reproduce the problem and found that it is due to the ConvertToXhtml filter. If you disable this filter you will not experience the issue.

 I notified our developers about the glitch and they will fix the issue in one of the upcoming latest internal builds. We will try to fix it until the Q1 2010 SP1 release.

We do appreciate your help on improving RadEditor and I updated your Telerik points.


Greetings,
Rumen
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Editor
Asked by
Amey
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Amey
Top achievements
Rank 1
Share this question
or