Closed gasman closed 2 years ago
ClusterForm overrides as_p to include child formsets in the form rendering:
as_p
https://github.com/wagtail/django-modelcluster/blob/62dae96cfb870b23a92c1559f67646c24caff869/modelcluster/forms.py#L313-L315
However, it returns a plain string rather than a SafeString instance - probably due to the use of ''.join - so outputting {{ form.as_p }} on a template causes the HTML to be escaped.
''.join
{{ form.as_p }}
ClusterForm overrides
as_p
to include child formsets in the form rendering:https://github.com/wagtail/django-modelcluster/blob/62dae96cfb870b23a92c1559f67646c24caff869/modelcluster/forms.py#L313-L315
However, it returns a plain string rather than a SafeString instance - probably due to the use of
''.join
- so outputting{{ form.as_p }}
on a template causes the HTML to be escaped.