Sanitises HTML to a whitelist that you can control
Validation functions can now return validation objects rather than simply outcomes.
Thanks to Brad Vogel for this functionality.
Adds the ability to configure HTML Janitor with validation functions that determine whether a given element should be allowed programatically.
Thanks Brad Vogel for adding this functionality.
Makes element configuration (e.g. p: true/false) symmetrical. Previously setting and element to false remove the element completely from the cleaned output.
It should be possible to allow all attributes on an element. This was mentioned in the documentation but was not working as intended.
As the previous behaviour was broken I don't believe anyone was using it but if you were then hopefully it will just magically work for you now.
Thanks Alex Palaistras for fixing this.
PRE has been added to the list of block elements
Changes the definition of what constitutes a block tag and also the code will now strip out incorrectly nested block and inline tags.
Thanks to Ankit Ahuja for this contribution.
Adds IE NodeWalker compatibility change from daniel-nelson, thanks.
Note: there are no CI tests for IE so support is not guaranteed
No functionality changes but corrects the package json for the NPM release