Telerik and the invalid HTML it renders

6 posts, 0 answers
  1. Alan Coulter
    Alan Coulter avatar
    8 posts
    Member since:
    Sep 2009

    Posted 31 Jan 2010 Link to this post

    Hi,
    We are finding that although the telerik control is accessible and prompts for accessible attributes, we are finding that the editor itself easily renders invalid HTML. Our content authors are going nuts because the use the tools provided within the editor, yet the final HTML is invalid.  It is not to do with XHTML or the fact that SharePoint strips out double quotes in tags, it is simple things like creating a table, then finding that it produces something like:
    <table>
    <thead>
    </thead>
    <tbody>
    <tr>
    <td>cell 1</td>
    <td>cell 2</td>
    </tr>
    </tbody>
    </table>

    In this instance, the thead is invalid because it does not contain any rows or columns. Other instances that I have seen:

    1) Telerik allows editors to create HTML like <a href=”...”><p>Hello World</p></a> or <span><p>Hello World</p></span>, which is invalid from a W3C HTML validation perspective.

    Is this the way it is or is there more configuration or user training that needs to be done?
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 01 Feb 2010 Link to this post

    Hello Alan,
    Could you confirm which version of RadEditor for MOSS you are using?

    1. The thead problem is fixed in the latest version of RadEditor for MOSS. One way of fixing the issue is creating your own content filter. You can find how to create your own filter in the following online help article http://www.telerik.com/help/aspnet-ajax/contentfilters.html.

    1) Telerik allows editors to create HTML like <a href=”...”><p>Hello World</p></a> or <span><p>Hello World</p></span>, which is invalid from a W3C HTML validation perspective. - Could you provide me with a step by step scenario of how to create such code with RadEditor?



    Kind regards,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  3. Alan Coulter
    Alan Coulter avatar
    8 posts
    Member since:
    Sep 2009

    Posted 01 Feb 2010 Link to this post

    Hi,

    We are using version 5_5_1 of the MOSS Rad Editor. Below are the filters we are currently using:
    <property name="ContentFilters">
    FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent
    </property>

    Do you have any good video tutorials that I could send to the Content Authors, particularly for the table editor? I find the table header columns and rows particularly confusing, as it ends up often putting <th> tags within the <tbody> sections.

    We are in UAT at the moment, with some page layouts containing 12 or so placeholders, so it would be a major change to update all of the page layouts at this time. I could possibly update our HTTP Handler which does a final scrub of the HTML. I also have written a 'ConvertToXHTML ' wrapper around each placeholder, so I could possibly put something in there also (note that as you know, even though telerik produces XHTML, SharePoint then modifies it. My code ensures that at presentation time, the content is XHTML compliant again).
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 02 Feb 2010 Link to this post

    Hi Alan,
    We do not have videos, but you can find information on table editing in the Rad Editor Ajax End User Manual. I attached it to this thread.

    Best wishes,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Alan Coulter
    Alan Coulter avatar
    8 posts
    Member since:
    Sep 2009

    Posted 02 Feb 2010 Link to this post

    Thanks for that. Is there a corresponding Admin manual for the settings? I found this to be really disjointed within the full help file.

    Also, for your reference, below our config settings. Perhaps it is something to do with the settings.
    One thing I noticed today, which was different to the rad editor demo site (http://demos.telerik.com/aspnet-ajax/editor/examples/builtincontentfilters/defaultcs.aspx) was that even if we have no table style selected, we are able to uncheck the boxes underneath this (in the demo we cannot).

    ConfigFile.xml:
    <configuration>
     <property name="ToolbarMode">ShowOnFocus</property>
     <property name="ToolsWidth">680px</property>
     <property name="UseSharedToolbar">true</property>
     <property name="AllowScripts">true</property>
     <property name="SpellDictionaryLanguage">en-AU</property>
     <property name="NewLineBr">false</property>
     <property name="ImagesPaths">
      <item>/SiteCollectionImages</item>
     </property>
     <property name="DocumentsPaths">
      <item>/SiteCollectionDocuments</item>
     </property>
     <property name="ContentFilters">FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent</property>
    </configuration>

    One thing which is really annoying is the Apply CSS drop down. For some reason, even though we have a CSSFiles.css file, all of the out of the box SharePoint styles show up. Any ideas?
  6. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 03 Feb 2010 Link to this post

    Hi Alan Coulter,

    was that even if we have no table style selected, we are able to uncheck the boxes underneath this (in the demo we cannot).
    - This behavior was requested by some of our clients and it was introduced in the latest version of RadEditor for ASP.NET AJAX, on which is based the latest version of RadEditor for MOSS 5.6.2. I suggest you to upgrade your version of the control to the latest one. You can find the instructions in the following online help article http://www.telerik.com/help/aspnet-ajax/upgrade_to_a_newer_version_of_radeditor_for_moss.html.

    Regarding the cssFiles collection. Did you set it in the respective ToolsFile.xml. Please review the following online help article http://www.telerik.com/help/aspnet-ajax/externalcssfiles.html. Provide me with your ToolsFile.xml and ListToolsFile.xml. And I will check the settings.


    Kind regards,
    Stanimir
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top