Skip to content
Snippets Groups Projects
Unverified Commit 6d85111a authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #2091 from OpenTechFund/upgrade-wagtail-2-9-3

Wagtail security release and escape help text in stream forms
parents b4629f57 320f2966
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ from django.db.models import BLANK_CHOICE_DASH ...@@ -8,6 +8,7 @@ from django.db.models import BLANK_CHOICE_DASH
from django.forms.widgets import ClearableFileInput from django.forms.widgets import ClearableFileInput
from django.utils.dateparse import parse_datetime from django.utils.dateparse import parse_datetime
from django.utils.encoding import force_str from django.utils.encoding import force_str
from django.utils.html import conditional_escape
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django_bleach.templatetags.bleach_tags import bleach_value from django_bleach.templatetags.bleach_tags import bleach_value
...@@ -55,7 +56,7 @@ class FormFieldBlock(StructBlock): ...@@ -55,7 +56,7 @@ class FormFieldBlock(StructBlock):
def get_field_kwargs(self, struct_value): def get_field_kwargs(self, struct_value):
kwargs = { kwargs = {
'label': struct_value['field_label'], 'label': struct_value['field_label'],
'help_text': struct_value['help_text'], 'help_text': conditional_escape(struct_value['help_text']),
'required': struct_value.get('required', False) 'required': struct_value.get('required', False)
} }
if 'default_value' in struct_value: if 'default_value' in struct_value:
......
...@@ -38,6 +38,6 @@ psycopg2==2.8.5 ...@@ -38,6 +38,6 @@ psycopg2==2.8.5
reportlab==3.5.34 reportlab==3.5.34
social_auth_app_django==3.1.0 social_auth_app_django==3.1.0
tomd==0.1.3 tomd==0.1.3
wagtail==2.9.2 wagtail==2.9.3
wagtail-cache==1.0.0 wagtail-cache==1.0.0
whitenoise==5.1.0 whitenoise==5.1.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment