StringUtils.StripHtml method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings
Assembly Skybrud.Essentials.dll

StripHtml(string)

Static

Strips all HTML elements from the specified html string.

public static string StripHtml(string html)

Parameters

html String

The input string containing the HTML.

Returns

The input string without any HTML markup.

StripHtml(string, String[])

Static

Strips all HTML elements from the specified html string, but keeps the HTML tags as specified in ignore.

public static string StripHtml(string html, String[] ignore)

Parameters

html String

The input string containing the HTML.

ignore Array of String

An of tag names (without the brackets, like div) to ignore.

Returns

The stripped result.