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

Self-closing Title tag hides remainder of page

3 Answers 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Gary Davis
Top achievements
Rank 2
Gary Davis asked on 19 Sep 2016, 08:23 PM
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

 

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Sep 2016, 01:47 PM
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.
0
Gary Davis
Top achievements
Rank 2
answered on 20 Sep 2016, 02:20 PM

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

0
Rumen
Telerik team
answered on 26 Sep 2016, 07:58 AM
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.
Tags
Editor
Asked by
Gary Davis
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Gary Davis
Top achievements
Rank 2
Share this question
or