summaryrefslogtreecommitdiffstats
path: root/hyperkitty
diff options
context:
space:
mode:
Diffstat (limited to 'hyperkitty')
-rw-r--r--hyperkitty/templates/month_view.html4
-rw-r--r--hyperkitty/templatetags/hk_generic.py7
2 files changed, 9 insertions, 2 deletions
diff --git a/hyperkitty/templates/month_view.html b/hyperkitty/templates/month_view.html
index 9f3a857..00b7a96 100644
--- a/hyperkitty/templates/month_view.html
+++ b/hyperkitty/templates/month_view.html
@@ -8,7 +8,7 @@
<div id="month-view">
<header>
- <div class="list-name">{{ mlist.display_name|default:mlist.name }}</div>
+ <div class="list-name">{{ mlist.display_name|default:mlist.name|escapeatsign }}</div>
<div class="month-name">{{ month|date:"F Y"|capfirst }}</div>
<ul class="month-info">
<li class="participant">
@@ -20,7 +20,7 @@
</ul>
{% if mlist.display_name %}
<p class="list-address">
- <a href="mailto:{{ list_address }}">{{ list_address }}</a>
+ <a href="mailto:{{ list_address|escapeatsign }}">{{ list_address|escapeatsign }}</a>
</p>
{% endif %}
</header>
diff --git a/hyperkitty/templatetags/hk_generic.py b/hyperkitty/templatetags/hk_generic.py
index 5f30bc2..d7e3d2c 100644
--- a/hyperkitty/templatetags/hk_generic.py
+++ b/hyperkitty/templatetags/hk_generic.py
@@ -90,3 +90,10 @@ def truncatesmart(value, limit=80):
# Join the words and return
return ' '.join(words) + '...'
+
+
+@register.filter(is_safe=True)
+def escapeatsign(text):
+ """To escape email addresses"""
+ return text.replace("@", u"\uff20")
+