Created
October 9, 2012 10:41
-
-
Save AmitKB/3857900 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Converts the html text to plain text | |
public static string RemoveHtmlStuffs(string htmlText) | |
{ | |
var rx = new Regex(@"<(.|\n)*?>"); | |
return SPEncode.HtmlDecode( // remove characters like , & etc | |
rx.Replace(htmlText, string.Empty) // remove html tags lik <p>,<div> etc | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment