HTMLTextbox, small improvement

May 20, 2012 at 8:02 AM

Hoi,

Might be an idea to add more Cleanups in the following code: 

 public class HtmlTextBlock : Control
 private string DecodeAndCleanupHtml(string html)
        {
            // this breaks the designer somehow
            StringBuilder builder = new StringBuilder();
            builder.Append(HttpUtility.HtmlDecode(html));
            builder.Replace(" "" ");
 
            //## added RdB:
            builder.Replace("&""&");
            builder.Replace("&lt;""<");
            builder.Replace("&gt;"">");
            builder.Replace("&apos;""'");
       
 
            return builder.ToString();
        }
Coordinator
Jun 25, 2012 at 2:41 PM

Thanks Rob!

Will put them in asap!