using AngleSharp.Css.Dom; using System; using System.Collections.Generic; namespace Ganss.Xss; /// /// Provides options to be used with . /// public class HtmlSanitizerOptions { /// /// Gets or sets the allowed tag names such as "a" and "div". /// public ISet AllowedTags { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); /// /// Gets or sets the allowed HTML attributes such as "href" and "alt". /// public ISet AllowedAttributes { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); /// /// Gets or sets the allowed CSS classes. /// public ISet AllowedCssClasses { get; set; } = new HashSet(); /// /// Gets or sets the allowed CSS properties such as "font" and "margin". /// public ISet AllowedCssProperties { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); /// /// Gets or sets the allowed CSS at-rules such as "@media" and "@font-face". /// public ISet AllowedAtRules { get; set; } = new HashSet(); /// /// Gets or sets the allowed URI schemes such as "http" and "https". /// public ISet AllowedSchemes { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); /// /// Gets or sets the HTML attributes that can contain a URI such as "href". /// public ISet UriAttributes { get; set; } = new HashSet(StringComparer.OrdinalIgnoreCase); /// /// Allow all custom CSS properties (variables) prefixed with --. /// public bool AllowCssCustomProperties { get; set; } /// /// Allow all HTML5 data attributes; the attributes prefixed with data-. /// public bool AllowDataAttributes { get; set; } }