Preventing CSS links from being stripped does not work when configured in C# code

Last post 09-23-2011, 7:49 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  09-22-2011, 6:25 PM 70158

    Preventing CSS links from being stripped does not work when configured in C# code

    We are attempting to turn off all the content stripping perfromed by the editor with the folling code:
    1. cm_htmlcontent.EnableStripIframeTags = false;  
    2. cm_htmlcontent.EnableStripLinkTagsCodeInjection = false;  
    3. cm_htmlcontent.EnableStripScriptTags = false;  
    4. cm_htmlcontent.EnableStripStyleTagsCodeInjection = false;  
    However stylesheet links such as this one are still being stripped away:
    1. <link rel="stylesheet" href="http://www.whatever.com/whatever.css" />  
     
    It looks like the settings in my C# code are being ignored.
     
    In order to investigate this problem further, I modified my ASPX code to look like this: 
    <CE:Editor id="cm_htmlcontent"
    AutoConfigure="None"
    BreakElement="Br"
    EnableBrowserContextMenu="false"
    EnableContextMenu="true"
    EnableViewState="false"
    FullPage="true"
    EnableStripIframeTags="false"
    EnableStripLinkTagsCodeInjection="false"
    EnableStripScriptTags="false"
    EnableStripStyleTagsCodeInjection="false"
    runat="server" /> 
     
    and it worked! My CSS links are no longer stripped. Is it normal that settings the 4 properties in my C# code does not work?
  •  09-23-2011, 7:49 AM 70175 in reply to 70158

    Re: Preventing CSS links from being stripped does not work when configured in C# code

    Hi frJericho,
     
    I tested it by the example below , it works fine for me. Does it work for your too?
     
    If it need a special example to reproduce it, please post here, so we can check it for you.
     
    <%@ Page Language="C#" %>

    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
    <head>
        <title>example</title>
    </head>

    <script runat="server">
        protected override void OnLoad(EventArgs e)
        {
            Editor1.EnableStripIframeTags = false;
            Editor1.EnableStripLinkTagsCodeInjection = false;
            Editor1.EnableStripScriptTags = false;
            Editor1.EnableStripStyleTagsCodeInjection = false;  
            base.OnLoad(e);
        }
    </script>
    <body>
        <form id="Form1" runat="server">
            <CE:Editor ID="Editor1" runat="server" >
            </CE:Editor>
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken
View as RSS news feed in XML