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

29 posts, 0 answers
  1. Tom Fallwell
    Tom Fallwell avatar
    17 posts
    Member since:
    Mar 2006

    Posted 26 Mar 2011 Link to this post

    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?
  2. Tom Fallwell
    Tom Fallwell avatar
    17 posts
    Member since:
    Mar 2006

    Posted 26 Mar 2011 Link to this post

    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

     

     

     

     

     

     

  3. Rohan
    Rohan avatar
    2 posts
    Member since:
    May 2007

    Posted 10 Apr 2011 Link to this post

    This is a serious problem. Our clients who have upgraded to IE9 cannot upload content on their sites because everything is blowing out.
  4. Robert Manjoney
    Robert Manjoney avatar
    5 posts
    Member since:
    Jul 2009

    Posted 11 Apr 2011 Link to this post

    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
  5. Daniel
    Daniel avatar
    17 posts
    Member since:
    Nov 2004

    Posted 12 Apr 2011 Link to this post

    This is  serious problem for our users also.  The RadEditor control under IE9 is arbitrarily adding multiple <br> tags to content.
  6. Rumen
    Admin
    Rumen avatar
    14413 posts

    Posted 13 Apr 2011 Link to this post

    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.

  7. debett
    debett avatar
    33 posts
    Member since:
    Feb 2007

    Posted 19 Apr 2011 Link to this post

    I have this problem (extra <br/>) with version 2011.1.315.40.
  8. Rumen
    Admin
    Rumen avatar
    14413 posts

    Posted 19 Apr 2011 Link to this post

    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.

  9. Daniel
    Daniel avatar
    17 posts
    Member since:
    Nov 2004

    Posted 26 Apr 2011 Link to this post

    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.
  10. Laverne Douglas
    Laverne Douglas avatar
    2 posts
    Member since:
    Nov 2002

    Posted 26 Apr 2011 Link to this post

    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.
  11. Stanimir
    Admin
    Stanimir avatar
    1654 posts

    Posted 27 Apr 2011 Link to this post

    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.

  12. David
    David avatar
    1 posts
    Member since:
    Jun 2011

    Posted 06 Jun 2011 Link to this post

    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;

     

     

    }

     

     

  13. Keith
    Keith avatar
    61 posts
    Member since:
    May 2008

    Posted 18 Jul 2011 Link to this post

    David,

    I don't think its a solution quite yet.

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

    Keith E.

  14. Rumen
    Admin
    Rumen avatar
    14413 posts

    Posted 19 Jul 2011 Link to this post

    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!

  15. Keith
    Keith avatar
    61 posts
    Member since:
    May 2008

    Posted 19 Jul 2011 Link to this post

    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
  16. Rumen
    Admin
    Rumen avatar
    14413 posts

    Posted 22 Jul 2011 Link to this post

    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!

  17. Bruce
    Bruce avatar
    1 posts
    Member since:
    Jul 2011

    Posted 27 Jul 2011 Link to this post

    And . .  exactly where should this code be added?

    Thanks, Bruce
  18. Stanimir
    Admin
    Stanimir avatar
    1654 posts

    Posted 28 Jul 2011 Link to this post

    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.

  19. Ernesto
    Ernesto avatar
    22 posts
    Member since:
    Sep 2010

    Posted 13 Sep 2011 Link to this post

    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.
  20. Stanimir
    Admin
    Stanimir avatar
    1654 posts

    Posted 13 Sep 2011 Link to this post

    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.
  21. Ernesto
    Ernesto avatar
    22 posts
    Member since:
    Sep 2010

    Posted 13 Sep 2011 Link to this post

    Hi Stanimir,

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

    Best regards,
    Ernesto.
  22. Ernesto
    Ernesto avatar
    22 posts
    Member since:
    Sep 2010

    Posted 14 Sep 2011 Link to this post

    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.
  23. Joshua
    Joshua avatar
    78 posts
    Member since:
    Sep 2008

    Posted 30 Jan 2012 Link to this post

    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
  24. Joshua
    Joshua avatar
    78 posts
    Member since:
    Sep 2008

    Posted 30 Jan 2012 Link to this post

    Just for information's sake, I've got release 2011.3.1305, Windows 7 and IE 9.
    -Joshua
  25. Rumen
    Admin
    Rumen avatar
    14413 posts

    Posted 31 Jan 2012 Link to this post

    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
  26. David O'Leary
    David O'Leary avatar
    19 posts
    Member since:
    Jul 2005

    Posted 20 Mar 2014 Link to this post

    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.
  27. Ianko
    Admin
    Ianko avatar
    1945 posts

    Posted 25 Mar 2014 Link to this post

    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.

     
  28. Kyle
    Kyle avatar
    1 posts
    Member since:
    Jul 2015

    Posted 24 Jul 2015 in reply to Ianko Link to this post

    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.
  29. Ianko
    Admin
    Ianko avatar
    1945 posts

    Posted 27 Jul 2015 Link to this post

    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
Back to Top