You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Uploading|RichTextFields are cleaned from unallowed html by using the models save() method [1].
As this is prone for errors because devs forget to call the clean method manually we should extend Uploading|RichTextFields to auto clean their html.
This could be achieved by using a custom field that overwrites the pre_save method [2] as described by [3].
Currently Uploading|RichTextFields are cleaned from unallowed html by using the models save() method [1].
As this is prone for errors because devs forget to call the clean method manually we should extend Uploading|RichTextFields to auto clean their html.
This could be achieved by using a custom field that overwrites the pre_save method [2] as described by [3].
[1] https://github.com/liqd/a4-meinberlin/blob/master/meinberlin/apps/ideas/models.py#L44
[2] https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.Field.pre_save
[3] https://docs.djangoproject.com/en/1.11/howto/custom-model-fields/#preprocessing-values-before-saving
The text was updated successfully, but these errors were encountered: