HtmlExtensions.StripHtml Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

StripHtml(string, bool)

Returns a string with all HTML tags and comments removed. This is useful for displaying HTML in plain text and stripping formatting like bold and italics.

public static string StripHtml(this string html, bool br = false)

Parameters

html
string

The string to strip of HTML.

br
bool

true to keep line breaks, otherwise false.

Returns

string

The stripped string.