-
Notifications
You must be signed in to change notification settings - Fork 249
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
Support Cleaner.validate (verify, etc.) #537
Comments
This was a duplicate and already rejected. I still think it's a very good idea and don't really understand the comments in the original issue. Proposed solution:
When verify mode is active, simply raise an exception from Sanitizing Filter whenever it makes a change. Catch that exception in the |
Duplicate of #109 |
Currently, we use something like the following as a partial implementation (inefficient: double parsing) of the above:
If I get more time to work on this, I'll be happy to propose a patch / forked project (as suggested in #109 ). |
Enhancement:
We want to reject dirty input rather than cleaning it. It seems painful to accomplish this by subclassing cleaner.
Curious if this could be either built-in or a hook added "on_content_change" that would be called whenever the content is changed from the original value due to bleach rules (this probably isn't the best approach as it would slow down the other uses of bleach, maybe
on_first_change
, though I think it would be better to build this in).Happy to look into a patch if you're amenable :)
The text was updated successfully, but these errors were encountered: