New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whitespace sanitization behavior changed #373
Comments
@makepanic |
I think I found the problem. MSIE11 won't create a full document if |
Let's see what the other browsers say... :D |
I think master is ready for a quick review, should be fixed imho. |
Thanks for the quick reply.
2.0.7 tested it only in chrome |
Just tried |
Awesome :D |
Background & Context
Hi,
thanks for developing this great package.
I'm in the progress of updating from 1.x.x to 2.x.x and noticed our tests failing.
It seems like 2.x.x introduced a changed behavior when sanitizing a whitespace character string.
Previously it returned the whitespace string but now it's an empty string.
I'm not sure if this is a bug or expected behavior. We're invoking the
sanitize
method like this:sanitize(text, { ALLOWED_TAGS: [] })
Bug
Input
Given output
`` - (empty string: string.length === 0)
Expected output
The text was updated successfully, but these errors were encountered: