How aggressively to sanitise an HTML fragment.
⚠️ stripAll and allowedTags are not additive: stripAll removes every tag and wins outright, so an allowedTags list passed alongside it is silently ineffective.
stripAll
allowedTags
Optional
Remove all tags, keeping text only. Overrides SanitizeHtmlOptions.allowedTags.
Tag names kept; everything else is stripped. Ignored when stripAll is set.
How aggressively to sanitise an HTML fragment.
⚠️
stripAllandallowedTagsare not additive:stripAllremoves every tag and wins outright, so anallowedTagslist passed alongside it is silently ineffective.