Self-closing Title tag hides remainder of page

4 posts, 0 answers
  1. Gary Davis
    Gary Davis avatar
    71 posts
    Member since:
    Oct 2003

    Posted 19 Sep Link to this post

    We have a content editor that uses the RadEditor for edit and display of HTML. Recent versions of the ASP.NET AJAX have caused this display problem for content blocks that contain a tag like <title /> instead of the correct <title></title>. Edge and Chrome do not like the <title /> and suppress the remainder of the page.

     

    The sample test case content is simply

       <html>
       <head>
       <title />
       </head>
      </html>

     

     Older versions of the RadEditor modify the title to prevent the issue:

       <textarea id="ctl00_AdminContent_ContentEditor1_RadEditor1ContentHiddenTextarea" name="ctl00$AdminContent$ContentEditor1$RadEditor1" rows="4" cols="20" style="display:none;">

       %3chtml%3e
       %3chead%3e
       %3ctitle /%3e
       %3c/head%3e
       %3c/html%3e

       </textarea>

    The current RadEditor versions emit a div instead of a textarea:

       <div id="ctl00_AdminContent_ContentEditor1_RadEditor1" class="RadEditor Web20 reWrapper" style="height:400px;width:680px;">
       <html>
       <head>
       <title />
       </head>
       </html>
       </div>

    The working version is 2015.3.930 and failing versions are 2016.2.607 and 2016.3.914.

    Regarding the <title /> issue, please see http://stackoverflow.com/a/196249

    Thanks,

    Gary Davis

     

  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 20 Sep Link to this post

    Hi Gary,

    I tested both versions the old 2015.3.930 and the latest one 2016.3.914 and reproduced similar results:

    <html>
        <head>
            <title>
        </head>
    </html>
    </title>
    </head>
    <body>
    </body>
    </html>


    Here is a video demonstration: http://screencast.com/t/nCyA45eP4fbn.

    As you can see the latest version also offers a hidden textarea element as the old version.

    You can implement a custom content filter that will strip the unwanted tags in the content area of RadEditor: Custom Content Filters.

    Best regards,
    Rumen
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gary Davis
    Gary Davis avatar
    71 posts
    Member since:
    Oct 2003

    Posted 20 Sep in reply to Rumen Link to this post

    How do I get the new version to use the hidden textarea instead of the div?

    In any case, I have updated my few hundred content blocks in the database to use the correct HTML title tag with a closing tag.

    Thanks,

    Gary Davis

  5. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 26 Sep Link to this post

    Hello,

    The latest version should use a hidden text area by default, since the editor uses it to encode the content and to submit it as part of the form.


    Best regards,
    Rumen
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top