-
Notifications
You must be signed in to change notification settings - Fork 185
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
DeprecationWarning: html5lib's sanitizer is deprecated #632
Comments
(Resuming discussion from #469) After a first brief analysis, this looks considerably more complicated than simply swapping one function call to html5lib with another to bleach. Although bleach itself relies on html5lib, they have a significantly different API. bleach itself uses html5lib at the moment but is considering forking it for much the same reasons. Finally, html5lib seems to be used in several places throughout the plugin code, not just for sanitizing. It's unclear to me on whether you'd expect to entirely remove html5lib, or just the sanitizing portions? All in all, maybe it'd be saner to wait for a decision from the bleach team on how they wish to handle html5lib and then either use their fork (if any is produced) or mimic / adapt what they'll chose to do. |
Haven't tested it, and can't vouch for its security or capabilities, but html-sanitizer seems like a well-tested and well-supported alternative that doesn't use html5lib. |
bleach is deprecated: mozilla/bleach#698 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
https://ckeditor.com/docs/ckeditor5/latest/updating/ckeditor4/migration-from-ckeditor-4.html end of life for ckeditor v4 was in June 23. |
We need to remove html5lib and use html-sanitizer instead. |
When checking out the deprecation messages of my djangoCMS project, I noticed that djangocms-text-ckeditor still uses html5lib, so I ended up here. In an issue on the bleach project, switching to nh3 is recommended, nh3 provides Python bindings to the Rust project ammonia (took some time to notice that NH_3 is the chemical formula of ammonia). I’ve been using it for a while without any problems. The only thing is: You can’t sanitize CSS selectively. But it seems that html-sanitizer doesn’t allow any inline styles at all. Anyway, that would be another option instead of using html-sanitizer. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is the activity bot, the counterpart of the stale bot, reminding that this issue is still relevant! |
Hello everyone,
I noticed that djangocms-text-ckeditor is requiring html5lib package which has a deprecated sanitizer.
html5lib recommends switching to bleach
Is this something known? Will there be a fix in a next version?
The text was updated successfully, but these errors were encountered: