IHtmlSanitizer
Enables an inheriting class to implement an HtmlSanitizer class, which cleans HTML documents and fragments
from constructs that can lead to XSS attacks.
Allow all HTML5 data attributes; the attributes prefixed with data-
Gets the allowed CSS at-rules such as "@media" and "@font-face".
Gets the allowed HTML attributes such as "href" and "alt".
Gets or sets the allowed CSS classes. If the set is empty, all classes will be allowed.
Gets or sets the allowed CSS properties such as "font" and "margin".
Gets the allowed URI schemes such as "http" and "https".
Gets the allowed HTML tag names such as "a" and "div".
Gets or sets a regex that must not match for legal CSS property values.
Gets or sets the Func<T> object the creates the parser used for parsing the input.
Gets or sets a value indicating whether to keep child nodes of elements that are removed.
Gets or sets the IMarkupFormatter object used for generating output.
Gets or sets the HTML attributes that can contain a URI such as "href".
Occurs when a URL is being sanitized.
Occurs after sanitizing the document and post processing nodes.
Occurs for every node after sanitizing.
Occurs before an at-rule is removed.
Occurs before an attribute is removed.
Occurs before a comment is removed.
Occurs before a CSS class is removed.
Occurs before a style is removed.
Occurs before a tag is removed.
Sanitizes the specified HTML.
Sanitizes the specified HTML document. Even if only a fragment is given, a whole document will be returned.
Sanitizes the specified HTML body fragment. If a document is given, only the body part will be returned.
Sanitizes the specified parsed HTML body fragment.
If the document has not been parsed with CSS support then all styles will be removed.