HtmlSanitizer by Michael Ganss

<PackageReference Include="HtmlSanitizer" Version="8.0.718" />

 HtmlSanitizerOptions

public class HtmlSanitizerOptions
Provides options to be used with HtmlSanitizer.
public ISet<CssRuleType> AllowedAtRules { get; set; }

Gets or sets the allowed CSS at-rules such as "@media" and "@font-face".

public ISet<string> AllowedAttributes { get; set; }

Gets or sets the allowed HTML attributes such as "href" and "alt".

public ISet<string> AllowedCssClasses { get; set; }

Gets or sets the allowed CSS classes.

public ISet<string> AllowedCssProperties { get; set; }

Gets or sets the allowed CSS properties such as "font" and "margin".

public ISet<string> AllowedSchemes { get; set; }

Gets or sets the allowed URI schemes such as "http" and "https".

public ISet<string> AllowedTags { get; set; }

Gets or sets the allowed tag names such as "a" and "div".

public ISet<string> UriAttributes { get; set; }

Gets or sets the HTML attributes that can contain a URI such as "href".