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

Generated end tag for self closing tag is not at right place

1 Answer 75 Views
Editor
This is a migrated thread and some comments may be shown as answers.
kusuma
Top achievements
Rank 1
kusuma asked on 04 May 2016, 05:49 AM

 

When I paste the below HTML in the RadEditor HTML View

<PB_START /><strong contenteditable="false">-----PageBreak-----</strong><PB_END />

Its generating the end tag for PB_START tag at wrong place. Please see below for the generated Html in the RadEditor corresponding to the above tag

<pb_start><strong contenteditable="false">-----PageBreak-----</strong><br><pb_end></pb_end><br></pb_start>

But we are expecting the end tag for pb_start tag after the start tag of <pb_start> not after the </pb_end> tag.

Please find below expected HTML

<pb_start></pb_start><strong contenteditable="false">-----PageBreak-----</strong><pb_end></pb_end>

Please let me know why the end tag </pb_start> is not after the <pb_start>. Is there any filter to resolve the above problem.


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 May 2016, 07:46 AM

Hello,

This is invalid XHTML and RadEditor does not support that. Moreover, browsers also perform some sanitization which is out of our control and they will also change such invalid snippets in an attempt to fix them.

I am attaching here a small sample that shows the browser behavior with an editable iframe (which is what RadEditor uses). You can observe the same behavior with RadEditor as well (for example, in this demo where you can remove some of its content filters).

Regards,

Marin Bratanov
Telerik
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
kusuma
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or