/// <summary> /// Cleans up an HTML string and removes HTML tags in blacklist /// </summary> /// <param name="html">The HTML.</param> /// <param name="blackList">The black list.</param> /// <returns></returns> public static string SanitizeHtml( string html, params string[] blackList ) { var sanitizer = new HtmlSanitizer(); if ( blackList != null && blackList.Length > 0 ) { sanitizer.BlackList.Clear(); foreach ( string item in blackList ) sanitizer.BlackList.Add( item ); } return sanitizer.Sanitize( html ); }