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

2 posts, 0 answers
  1. kusuma
    kusuma avatar
    1 posts
    Member since:
    May 2016

    Posted 04 May 2016 Link to this post


    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.

  2. Marin Bratanov
    Marin Bratanov avatar
    5359 posts

    Posted 04 May 2016 Link to this post


    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).


    Marin Bratanov
    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