Issue in RadEditor when switching between Design and Html View

4 posts, 0 answers
  1. Tom
    Tom avatar
    27 posts
    Member since:
    Sep 2005

    Posted 17 Jan 2012 Link to this post

      we have found a issue that adding duplicate attributes to a perticular tag if src attribute is there.
    it is occured when When I added following Java script
    “<script src="¬test-test.js"></src>”  to an existing HTML content “<STRONG><FONT size=6 face="Courier New">test jayani<BR>
        &nbsp;<IMG title=test alt=test src="/CurrentCourse/logo.jpg">&nbsp;</FONT></STRONG>”

    after adding those scripts and switching between design and html views it comes like this

    <strong><font size="6" face="Courier New">test jayani<br>
        <br> <script src="¬test-test.js"></src>
        &nbsp;<IMG title=test alt=test src="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg" originalAttribute="src" originalPath="/CurrentCourse/logo.jpg">&nbsp;</FONT></STRONG>

    here originalAttribute and originalPath attributes keep on adding to the IMG tag. This is happens when "MakeUrlsAbsolute" filter is on.  This will work as same for the java scripts as well.
    Please take a look on this and do needful.


  2. Rumen
    Rumen avatar
    14459 posts

    Posted 20 Jan 2012 Link to this post


    The content that you load is invalid and this misleads the regular expressions of the MakeUrlsAbsolute filter of RadEditor. It is not allowed to close a script tag with </src> tag and you cannot produce such content with RadEditor tools. If you think that your users could go to HTML mode and write such content, it is better to disable HTML mode setting EditModes="Design,Preview".

    Best regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Manoj
    Manoj avatar
    3 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post


    I'm able to save the content with <script> tags (to the database) by disabling the RemoveScripts filter. However, after loading the content and I switch to the HTML view, the script block, for example, <script type="text/javascript" charset="utf-8" src=""></script> disappears!

    I believe we're using the version "RadControls for ASP.NET AJAX Q3 2010"

    Appreciate your help.


  4. Rumen
    Rumen avatar
    14459 posts

    Posted 16 Feb 2012 Link to this post


    Could you please disable the RemoveScripts filter by setting and enabling the desired filters inline through the ContentFilters property of RadEditor, e.g.

    <telerik:RadEditor ID="RadEditor1" runat="server" ContentFilters="ConvertToXhtml,ConvertFontToSpan,OptimizeSpans,MozEmStrong">
        <Content>aaa<script type="text/javascript" charset="utf-8" src=""></script></Content>

    This works for me.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top