String CleanInput(string strIn)
{
// Replace invalid characters with empty strings.
// Replace all html tags
return Regex.Replace(strIn, @"</?[^>]*>", "");
// Replace html tags div or span
//return Regex.Replace(strIn, @"</?(div|span)[^>]*>", "");
}
转载于:https://www.cnblogs.com/lear/archive/2012/03/12/2391296.html