django-cms / djangocms-text-ckeditor

Text Plugin for django CMS using CKEditor 4
https://www.django-cms.org/en/repositories-plugins/
BSD 3-Clause "New" or "Revised" License
164 stars 186 forks source link

Impossible to override allowed_css_properties of TextSanitizer #643

Closed gs1-rob-392 closed 10 months ago

gs1-rob-392 commented 1 year ago

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

fsbraun commented 1 year ago

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[bot] commented 11 months ago

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[bot] commented 10 months ago

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