SanitizerConfig Class

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dictdef-sanitizerconfig. A member that is null does not exist.

public sealed class SanitizerConfig

Constructors

NameDescription
SanitizerConfig()

SanitizerConfig()

public SanitizerConfig()

No documentation is available.

Properties

NameDescription
AttributesGets the attributes to allow.
CommentsGets a value indicating whether comments are allowed.
DataAttributesGets a value indicating whether custom data-* attributes are allowed.
ElementsGets the elements to allow, with their allowed or removed attributes.
JavaScriptUrlsGets a value indicating whether javascript: URLs are allowed.
ProcessingInstructionsGets the processing instructions to allow.
RemoveAttributesGets the attributes to remove.
RemoveElementsGets the elements to remove with their content.
RemoveProcessingInstructionsGets the processing instructions to remove.
ReplaceWithChildrenElementsGets the elements to replace with their children.

Gets a value indicating whether comments are allowed.

public bool? Comments { get; init; }

DataAttributes

SanitizerTypes.cs

Gets a value indicating whether custom data-* attributes are allowed.

public bool? DataAttributes { get; init; }

Gets the elements to allow, with their allowed or removed attributes.

public IReadOnlyList<SanitizerElementWithAttributes>? Elements { get; init; }

JavaScriptUrls

SanitizerTypes.cs

Gets a value indicating whether javascript: URLs are allowed.

public bool? JavaScriptUrls { get; init; }

ProcessingInstructions

SanitizerTypes.cs

Gets the processing instructions to allow.

public IReadOnlyList<SanitizerPI>? ProcessingInstructions { get; init; }

RemoveAttributes

SanitizerTypes.cs

RemoveElements

SanitizerTypes.cs

RemoveProcessingInstructions

SanitizerTypes.cs

Gets the processing instructions to remove.

public IReadOnlyList<SanitizerPI>? RemoveProcessingInstructions { get; init; }

ReplaceWithChildrenElements

SanitizerTypes.cs

Gets the elements to replace with their children.

public IReadOnlyList<SanitizerElement>? ReplaceWithChildrenElements { get; init; }