Html No Script Handling Enumeration
An enumeration of the ways that HtmlToHtml can handle <noscript> elements.
Definition
Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public enum HtmlNoScriptHandlingRemarks
An enumeration of the ways that HtmlToHtml can handle <noscript> elements.
The HTML5 specification tokenizes the content of a <noscript> element differently depending on whether scripting is enabled in the application that renders the HTML. If the HtmlTagCallback is being used to filter the HTML, then the content must be tokenized the same way that the renderer will interpret it, or else markup could bypass the callback. See NoScriptHandling for details.
Members
| Unwrap | 0 | The content of <noscript> elements is tokenized as normal markup and passed to the HtmlTagCallback, but the <noscript> start and end tags themselves are removed from the output. The resulting HTML is interpreted the same way regardless of whether scripting is enabled in the renderer. This is the default and the recommended value when the renderer is unknown. |
| ScriptingEnabled | 1 | Tokenize the HTML as if scripting is enabled: the content of <noscript> elements is treated as raw text and written to the output verbatim without being passed to the HtmlTagCallback. Only use this value if the output will always be rendered with scripting enabled. |
| ScriptingDisabled | 2 | Tokenize the HTML as if scripting is disabled: the content of <noscript> elements is tokenized as normal markup and passed to the HtmlTagCallback, and the <noscript> tags are also passed to the callback. Only use this value if the output will always be rendered with scripting disabled. |