diff --git a/hypha/apply/stream_forms/blocks.py b/hypha/apply/stream_forms/blocks.py index e6b07d45ca1d86d00ebebba81b80536f3bcf0a66..33e98e74b463bb2881dca971fb391cda2e71db5d 100644 --- a/hypha/apply/stream_forms/blocks.py +++ b/hypha/apply/stream_forms/blocks.py @@ -11,7 +11,7 @@ from django.utils.html import conditional_escape from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ from django_bleach.templatetags.bleach_tags import bleach_value -from unidecode import unidecode +from anyascii import anyascii from wagtail.core.blocks import ( BooleanBlock, CharBlock, @@ -44,7 +44,7 @@ class FormFieldBlock(StructBlock): template = 'stream_forms/render_field.html' def get_slug(self, struct_value): - return force_str(slugify(unidecode(struct_value['field_label']))) + return force_str(slugify(anyascii(struct_value['field_label']))) def get_field_class(self, struct_value): return self.field_class diff --git a/requirements.txt b/requirements.txt index 2ed5bc5cd8b9bd2e2a7236e552fd156ed44cc96a..4f439612a5828c684f8be727e6149496c63da7ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -46,3 +46,4 @@ wagtail-cache==1.0.1 wagtail-purge==0.1 wagtail==2.13 whitenoise==5.2.0 +anyascii==0.2.0