diff --git a/src/agenda_culturel/templates/agenda_culturel/page-month.html b/src/agenda_culturel/templates/agenda_culturel/page-month.html index b8e7703..993ee83 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-month.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-month.html @@ -107,7 +107,7 @@ {% if event.start_day == day.date and event.start_time %} {{ event.start_time }} {% endif %} - {{ event|picto_status }} {{ event.title }} {{ event|tw_badge }} + {{ event|picto_status }} {{ event.title|no_emoji }} {{ event|tw_badge }} {% endfor %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-upcoming.html b/src/agenda_culturel/templates/agenda_culturel/page-upcoming.html index 3694735..c1a1fcc 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-upcoming.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-upcoming.html @@ -99,7 +99,7 @@ {% if event.start_time %} {{ event.start_time }} {% endif %} - {{ event|picto_status }} {{ event.title }} {{ event|tw_badge }} + {{ event|picto_status }} {{ event.title|no_emoji }} {{ event|tw_badge }} {% endfor %} diff --git a/src/agenda_culturel/templates/agenda_culturel/page-week.html b/src/agenda_culturel/templates/agenda_culturel/page-week.html index faf783c..c078f32 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-week.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-week.html @@ -89,7 +89,7 @@ {% if event.start_day == day.date and event.start_time %} {{ event.start_time }} {% endif %} - {{ event|picto_status }} {{ event.title }} + {{ event|picto_status }} {{ event.title|no_emoji }} {{ event|tw_badge }}
diff --git a/src/agenda_culturel/templatetags/utils_extra.py b/src/agenda_culturel/templatetags/utils_extra.py index 105fa5c..a2df4f3 100644 --- a/src/agenda_culturel/templatetags/utils_extra.py +++ b/src/agenda_culturel/templatetags/utils_extra.py @@ -9,6 +9,7 @@ from django.urls import reverse_lazy from django.templatetags.static import static from string import ascii_uppercase as auc from django.utils.html import strip_tags +import emoji register = template.Library() @@ -137,3 +138,6 @@ def is_string(val): def html_vide(val): return len(strip_tags(val).replace(" ", "").strip()) == 0 +@register.filter +def no_emoji(text): + return emoji.replace_emoji(text, replace='')