From: Guillaume Pellerin Date: Wed, 9 Nov 2016 15:40:53 +0000 (+0100) Subject: Add spam filter X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fcfa7b855785c45feeb15c57bb30b07b95a298eb;p=mezzo.git Add spam filter --- diff --git a/app/organization/core/templatetags/organization_tags.py b/app/organization/core/templatetags/organization_tags.py index e232532e..e0603b4b 100644 --- a/app/organization/core/templatetags/organization_tags.py +++ b/app/organization/core/templatetags/organization_tags.py @@ -170,3 +170,7 @@ def current_year(): @register.filter def is_not_host(organizations): return organizations.exclude(is_host=True) + +@register.filter +def unspam(email): + return email.replace('@', ' (at) ') diff --git a/app/templates/network/person_detail.html b/app/templates/network/person_detail.html index 7c938fe1..84928c8e 100644 --- a/app/templates/network/person_detail.html +++ b/app/templates/network/person_detail.html @@ -31,7 +31,7 @@ {{ person.bio|richtext_filters|safe }} {% endeditable %} -

{% trans 'Email' %} : {% if not person.email %}{{ person_email }}{% else %}{{ person.email }}{% endif %}

+

{% trans 'Email' %} : {% if not person.email %}{{ person_email }}{% else %}{{ person.email|unspam }}{% endif %}

{% with person.activities.all as activities %} {% if activities %}