Ejemplo n.º 1
0
        protected override void Render(HtmlTextWriter writer)
        {
            // Render the content of this control to a string
            StringWriter sw = new StringWriter();
            System.Reflection.ConstructorInfo constructor
                = writer.GetType().GetConstructor(new Type[] { sw.GetType() });
            HtmlTextWriter htw = constructor.Invoke(new object[] {sw}) as HtmlTextWriter;
            base.RenderChildren(htw);
            htw.Close();

            // Filter the string and write the result
            Filter f = new Filter();
            f.ClientSideFilterName = ClientSideFilterName;
            f.SupportNoScriptTables = SupportNoScriptTables;
            f.MaxComplexity = MaxComplexity;
            f.TrustedImageUrlRegex = TrustedImageUrlRegex;
            f.SpamFreeLinkUrlRegex = SpamFreeLinkUrlRegex;
            writer.Write(f.FilterUntrusted(sw.ToString()));
        }