Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis. Built on htmlparser2 for speed and tolerance
Prior to 2.4.0, allowedClasses can be false, this has been an undocumented feature.
Since 2.4.0, this behavior is broken. This PR reverted to the previous behavior where false is allowed in the allowedClasses attribute.
[x] It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
Summary
Prior to 2.4.0,
allowedClasses
can be false, this has been an undocumented feature. Since 2.4.0, this behavior is broken. This PR reverted to the previous behavior wherefalse
is allowed in theallowedClasses
attribute.See https://github.com/apostrophecms/sanitize-html/discussions/621 for more detail
What are the specific steps to test this change?
The following code is broken in the main branch of this base repo, but should work in the branch in this pr.
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
Other information: