Skip to content
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

Impossible to override allowed_css_properties of TextSanitizer #643

Closed
gs1-rob-392 opened this issue Apr 13, 2023 · 3 comments
Closed

Impossible to override allowed_css_properties of TextSanitizer #643

gs1-rob-392 opened this issue Apr 13, 2023 · 3 comments
Labels

Comments

@gs1-rob-392
Copy link

gs1-rob-392 commented Apr 13, 2023

Hi, is there a way to override allowed_css_properties of TextSanitizer?
I'm trying to add box-shadow, because html5lib.Filter doesn't include it.

@fsbraun
Copy link
Member

fsbraun commented Apr 18, 2023

Hi @gs1-rob-392 ! Indeed, this is not easily possible with a setting. Since the sanitizer of Html5lib has been deprecated (#632) I do not expect changes to the current sanitizing process but rather an update to another sanitizer library.

If you need this urgently, I'd suggest patching djangocms_text_ckeditor.html._filter_kwargs() function to include the allowed_css_properties you need. Not nice, but a work-around.

@stale
Copy link

stale bot commented Jul 17, 2023

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.

@stale stale bot added the stale label Jul 17, 2023
@stale
Copy link

stale bot commented Aug 15, 2023

This will now be closed due to inactivity, but feel free to reopen it.

@stale stale bot closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants