Rad Editor Strips Back Ground Image and JS

3 posts, 0 answers
  1. Platinum
    Platinum avatar
    31 posts
    Member since:
    Jan 2008

    Posted 27 Aug 2014 Link to this post

    Hi I am using the RadEditor for SharePoint 2010.

    I am using the following html in RadEditor

    <style>.maincontent     { color:#fff; padding:30px; width:100%; height:34.444em; margin-top:0;background:url(/Partner-Us/PublishingImages/banner.jpg) no-repeat top left;} </style> <div class="maincontent"> Sample Content  </div>

    in my RadEditor i have the following setting

                   <radE:RadHtmlField id="PageContent"  FieldName="PublishingPageContent" runat="server" AllowScripts="true" AllowSpecialTags="true">

    But still it strips the background image. I happens for the javascript also, any solution to overcome this ?
  2. Platinum
    Platinum avatar
    31 posts
    Member since:
    Jan 2008

    Posted 27 Aug 2014 in reply to Platinum Link to this post

    i am using rad editor version 2014.1.403.35
  3. Ianko
    Ianko avatar
    1894 posts

    Posted 28 Aug 2014 Link to this post


    What happens is that only the background:url(/Partner-Us/PublishingImages/banner.jpg) no-repeat top left; is stripped. This behavior do not come from RadEditor logic, this is due to SharePoint's security matter described in this blog.

    Investigating the saved HTML content you will see that the HTML and the CSS are correctly submitted, only due to the white color of the text it appears merged with the white background. You can test with a background-color property instead to examine different results.

    As for the scripts, the AllowScripts="true" AllowSpecialTags="true" properties are obsolete and to enable using script tags you should disable the RemoveScripts and EncodeSripts filters. More details about how to configure the ContentFilters property is available in this demo, where you can also test the results from different configurations scenarios.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top