Pass the strng value to below mentioned function to scrab out HTML
Public Shared Function StripHtml(ByVal html As String, ByVal allowHarmlessTags As Boolean) As String If html Is Nothing OrElse html = String.Empty Then Return String.Empty End If
If allowHarmlessTags Then Return System.Text.RegularExpressions.Regex.Replace(html, "", String.Empty) End If
Return System.Text.RegularExpressions.Regex.Replace(html, "<[^>]*>", String.Empty) End Function
No comments:
Post a Comment