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

IE9 and RadEditor adding additional <br></br> tags with each postback

28 Answers 494 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tom Fallwell
Top achievements
Rank 1
Tom Fallwell asked on 26 Mar 2011, 06:43 PM
I am using RadEditor in a DNN module. With IE9 only I find that any postback of a page with RadEditor that all normal line breaks are being replaced with <br>vbCrLf</br>. Since this happens with each postback, simply toggling between Design and HTML mode adds more and more of these. It makes RadEditor unusable.

The only fix I have found is to add this meta tag to the Default.aspx in DNN's root folder. This forces the browser to IE8 mode if it is IE9.
<meta http-equiv="X-UA-Compatible" content="IE=8; IE=7; IE=5" />

Is there any other way to fix this?

28 Answers, 1 is accepted

Sort by
0
Tom Fallwell
Top achievements
Rank 1
answered on 26 Mar 2011, 07:39 PM
I found a solution for this. Posting here in case it helps anyone else.

For any module control in my DNN module, I added the following event. This works well and prevents the need to alter the Default.aspx file. It is at least a workaround for now.

Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
    Dim metatag As HtmlMeta = New HtmlMeta
    metatag.Attributes.Add("http-equiv", "X-UA-Compatible")
    metatag.Attributes.Add("content", "IE=8; IE=7; IE=5")
    Page.Header.Controls.AddAt(0, metatag)
End Sub

 

 

 

 

 

 

0
Rohan
Top achievements
Rank 1
answered on 10 Apr 2011, 01:11 PM
This is a serious problem. Our clients who have upgraded to IE9 cannot upload content on their sites because everything is blowing out.
0
Robert Manjoney
Top achievements
Rank 1
answered on 11 Apr 2011, 12:58 PM
Thank you for posting your workarounds. This is indeed a serious bug and has been driving me crazy all weekend. I used your first workaround (posted the meta in DNN's default.aspx). Not sure where your second workaround should be placed, could you clarify?

Thanks,
Bob
0
Daniel
Top achievements
Rank 1
answered on 12 Apr 2011, 04:37 PM
This is  serious problem for our users also.  The RadEditor control under IE9 is arbitrarily adding multiple <br> tags to content.
0
Rumen
Telerik team
answered on 13 Apr 2011, 03:23 PM
Hi Daniel,

This problem is fixed in the regular RadEditor Q1 2011 version 2011.1.315. If you experience this problem with the DNN Pro provider offered and supported only by DotNetNuke Corp, my recommendation is to post your question in the DNN forums.

Greetings,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
debett
Top achievements
Rank 1
answered on 19 Apr 2011, 02:22 PM
I have this problem (extra <br/>) with version 2011.1.315.40.
0
Rumen
Telerik team
answered on 19 Apr 2011, 03:41 PM
Hello Debett,

Could you please try to reproduce the reported problem in the latest version 2011.1.413 which is the live demos of RadEditor? If the problem is fixed upgrade to the latest build. If you still experience it please provide sample content and steps to reproduce.

Best regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Daniel
Top achievements
Rank 1
answered on 26 Apr 2011, 07:11 PM
This problem still exists in v2011.1.413.  We have multiple reports from multiple users reporting the behaviour described here, and we have some customers who are now considering abandoning our product due to this problem.

The RadEditor control sometimes injects hundreds (and sometimes tens of thousands) of empty <br> elements and <p> elements into users' content. 

As yet the bug seems impossible to reproduce in a controlled setting; we have had no success predicting or determining the exact sequence of steps for reproducing this behaviour.
0
Laverne Douglas
Top achievements
Rank 1
answered on 27 Apr 2011, 12:27 AM
I have noticed that the editor is not handling any self closing tags properly. E.g. <img/>, <br/>. So I switch to compatiblility mode in IE9 and the editor behaves as expected. But, it still needs to be fixed for IE9.
0
Stanimir
Telerik team
answered on 27 Apr 2011, 02:44 PM
Hello Laverne,


I have noticed that the editor is not handling any self closing tags properly. E.g. <img/>, <br/>. So I switch to compatiblility mode in IE9 and the editor behaves as expected. But, it still needs to be fixed for IE9. -
This problem was fixed in the latest version of RadEditor 2011.1.314.xx.


Kind regards,
Stanimir
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
David
Top achievements
Rank 1
answered on 06 Jun 2011, 02:57 PM
This problem is not fixed,  if you enter the following in html view

<root>

<tag alias="abc" placementid="1835003" />

<tag alias="def" placementid="1835003" />

</root>

then switch between design and html view, the xml is modified and wrong.

I found a solution

 

 

 

 

function OnClientLoad(editor, args) {

 

 

editor.get_filtersManager().add(

 

 

new RadEditorCustomFilter());

 

 

}

 

RadEditorCustomFilter =

 

 

function () {

 

 

RadEditorCustomFilter.initializeBase(

 

 

this);

 

 

 

 

 

this.set_isDom(false);

 

 

 

 

 

this.set_enabled(true);

 

 

 

 

 

this.set_name("RadEditor filter");

 

 

 

 

 

this.set_description("RadEditor filter description");

 

 

}

 

RadEditorCustomFilter.prototype =

 

{

 

getHtmlContent:

 

 

function (content) {

 

 

newContent = content.replace(/&amp;/gi,

 

 

"&");

 

 

newContent = CloseToEmpty(newContent)

 

 

 

 

return newContent;

 

 

},

 

getDesignContent:

 

 

function (content) {

 

 

newContent = CloseToEmpty(content)

 

 

 

 

return newContent;

 

 

}

 

}

 

 

 

 

if (Telerik.Web.UI.Editor) {

 

 

RadEditorCustomFilter.registerClass(

 

 

'RadEditorCustomFilter', Telerik.Web.UI.Editor.Filter);

 

 

}

 

 

 

 

function CloseToEmpty(content) {

 

 

 

 

 

var newContent = "";

 

 

 

 

 

var ii = 0;

 

 

 

 

 

var inOne = 0;

 

 

 

 

 

var startCount = 0;

 

 

 

 

 

var endCount = 0;

 

 

 

 

 

for (ii = 0; ii < content.length; ii++) {

 

 

 

 

 

if (content[ii] == "<") {

 

 

inOne = 1;

 

startCount = ii;

 

}

 

 

 

 

if (inOne == 1 && endCount < startCount && content[ii] == " ") {

 

 

endCount = ii;

 

}

 

 

 

 

if (content[ii] == "/") {

 

 

 

 

 

//check if previous was self closing

 

 

 

 

 

 

 

 

 

 

 

if (inOne == 1 && (ii + 1) < content.length && content[ii + 1] == ">") {

 

 

 

 

 

//time to change and get tag name

 

 

 

 

 

 

 

 

inOne = 0;

 

 

 

 

var tagname = "";

 

 

 

 

 

if (endCount > startCount) {

 

 

tagname = content.substring(startCount + 1, endCount);

 

}

 

 

else {

 

 

tagname = content.substring(startCount + 1, ii);

 

}

 

newContent +=

 

 

"></" + tagname;

 

 

}

 

 

else {

 

 

newContent += content[ii];

 

}

 

}

 

 

else {

 

 

newContent += content[ii];

 

}

 

}

 

 

 

 

return newContent;

 

 

}

 

 

0
Keith
Top achievements
Rank 1
answered on 18 Jul 2011, 04:34 PM
David,

I don't think its a solution quite yet.

Tried it and it has no effect on <br  /> tags.

Keith E.

0
Rumen
Telerik team
answered on 19 Jul 2011, 04:07 PM
Hi Keith,

Could you please send steps and content that will help us to reproduce the <br> multiplication problem with the latest version of RadEditor (Q2 2011)? Are you able to produce such content with RadEditor's tools?

Kind regards,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Keith
Top achievements
Rank 1
answered on 19 Jul 2011, 04:48 PM
Just switching between design and HTML views adds additional <br /> tags.
Windows 7 and IE9
We have version 2010.3.1317.35 and don't plan to upgrade at this time.

Keith
0
Rumen
Telerik team
answered on 22 Jul 2011, 07:40 AM
Hello Keith,

Version 2010.3.1317.35 does not support IE9, which was released later.
Official support for this browser was introduced in the next Q1 2011 (version 2011.1.315).

If you do not plan to upgrade soon, you can render the page in IE9 as in IE8 using the following meta tag and you should not experience the <br /> tag multiplication problem:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> 


Best regards,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Bruce
Top achievements
Rank 1
answered on 28 Jul 2011, 03:27 AM
And . .  exactly where should this code be added?

Thanks, Bruce
0
Stanimir
Telerik team
answered on 28 Jul 2011, 08:46 AM
Hi Bruce,

You should add this in the <head> section of the web page.
For example:
<head>
    <title></title>
    ...
             <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />      
    ...
</head>


Kind regards,
Stanimir
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Ernesto
Top achievements
Rank 1
answered on 13 Sep 2011, 07:02 AM
Hi Stanimir,

I'm using version 2010.3.1317.0 and of course have the same problem in IE9.
Emulate IE8 is not a solution for us. Upgrade to new version of Telerik is planned, but it can not be done now.

This problem is very urgent for us, our partners and our consumers.
Could you please provide fix or recommend where I should look for the problem?

Thanks in advance,
Ernesto.
0
Stanimir
Telerik team
answered on 13 Sep 2011, 12:34 PM
Hello Ernesto,

Your best option is the upgrade. The problem is in the ConvertToXhtml content filter. What you can do is turn off this filter. You can find helpful information in the following online help articles: http://www.telerik.com/help/aspnet-ajax/editor-content-filters.html,
Set Properties Via Config File




Kind regards,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ernesto
Top achievements
Rank 1
answered on 13 Sep 2011, 01:20 PM
Hi Stanimir,

Thanks a lot! You have saved a lot of my time :)

Best regards,
Ernesto.
0
Ernesto
Top achievements
Rank 1
answered on 14 Sep 2011, 12:35 PM
Disable ConvertToXHtml filter was simple, but valid html is very important for us.
So here steps to solve a problem for 2010.3.1317.0 Telerik version:

  • open Telerik.Web.UI -> Editor -> RadEditor -> EditorFiltersManager.js
  • insert next code to _appendElementNode function:

    if ($telerik.isIE && name == "br" && navigator.appVersion.indexOf("MSIE 9") > 0) {
        sb.append("<br />");
        return;
    }

Enjoy :)

--
Ernesto.
0
Joshua
Top achievements
Rank 1
answered on 30 Jan 2012, 07:56 PM
I agree. I have Jan 5, 2012's release of the DNN modules and this is STILL not fixed.

Please fix in your builds.
Joshua
0
Joshua
Top achievements
Rank 1
answered on 30 Jan 2012, 07:59 PM
Just for information's sake, I've got release 2011.3.1305, Windows 7 and IE 9.
-Joshua
0
Rumen
Telerik team
answered on 31 Jan 2012, 12:17 PM
Hi Joshua,

Are you able to reproduce the problem in the Default Example which works with the latest version 2011.3.1305 of RadEditor?
If yes, could you please provide sample content and steps to reproduce the problem.

Best regards,
Rumen
the Telerik team
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
0
David O'Leary
Top achievements
Rank 2
answered on 21 Mar 2014, 03:11 AM
This issue can still be reproduced in the latest version of DNN, 7.2.2 (released today) which has version 2013.2.717.40 of Telerik.Web.UI.dll.

To reproduce in DNN:
Go into the Host -> HTML Editor Manager. With the DotNetNuke.RadEditorProvider selected as the current provider, select Everyone and make sure all of the Content Filters are checked, and save any changes.
Then, using IE11, in an HTML module, edit content and in design mode enter "test" then Shift-Enter to create a line break and enter "test" then switch from design mode to HTML and back a few times and you'll see the line breaks piling up.

If I uncheck ConvertToXhtml within the Content Filters area of the HTML Editor Manager, the problem goes away.
0
Ianko
Telerik team
answered on 25 Mar 2014, 08:50 AM
Hi David,

The described problem is indeed reproducible with the version used by DNN. I would like to point out that this version is released before the IE11 official release and respectfully this Telerik UI version has not been used with this browser version. 

I tested the same configuration with the latest version of the RadEditor (2014 Q1) and it appears that this issue is handled and everything acts as expected. I recommend upgrading the version of the used libraries in your DNN solution to resolve the issue. Also I would like to inform you that many more incompatibility issues has been handled.

If you have difficulties on upgrading the version of the Telerik controls, please contact the DNN support for proper assistance on this matter.

Regards,
Ianko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Kyle
Top achievements
Rank 1
answered on 24 Jul 2015, 04:48 PM
Telerik blames DNN and DNN blames Telerik.  Meanwhile this problem has been going on for more than half a decade and nothing gets done about it!  Continued complaints on support forums at both companies results in nothing but finger pointing.  Unreal.  The best solution is to just not use the Telerik editor on DNN sites.  There are other editor options out there.  Problem solved.
0
Ianko
Telerik team
answered on 27 Jul 2015, 02:14 PM
Hello Kyle,

As stated below, this is indeed an incompatibility issue of RadEditor with IE11. Although, this is expected as the used version is older that the release of IE11. There is no technical way such a version to be properly supported in future browsers as they always come with huge changes that are handled with the release of new version. 

The solution is to upgrade the Telerik UI for ASP.NET AJAX in DNN. But the answer to how this is done, is something that is relevant to DNN and it is best to contact the DNN support in order to get help on upgrading the RadEditor version.​ 

Regards,
Ianko
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Editor
Asked by
Tom Fallwell
Top achievements
Rank 1
Answers by
Tom Fallwell
Top achievements
Rank 1
Rohan
Top achievements
Rank 1
Robert Manjoney
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Rumen
Telerik team
debett
Top achievements
Rank 1
Laverne Douglas
Top achievements
Rank 1
Stanimir
Telerik team
David
Top achievements
Rank 1
Keith
Top achievements
Rank 1
Bruce
Top achievements
Rank 1
Ernesto
Top achievements
Rank 1
Joshua
Top achievements
Rank 1
David O'Leary
Top achievements
Rank 2
Ianko
Telerik team
Kyle
Top achievements
Rank 1
Share this question
or