-{% load i18n extra_tags email_tags %}\r
-\r
-{% declare %}\r
- prefix = settings.EMAIL_SUBJECT_PREFIX\r
- app_name = settings.APP_SHORT_NAME\r
- app_url = settings.APP_URL\r
- newmember_name = newmember.username\r
- newmember_url = newmember.get_profile_url\r
-{% enddeclare %}\r
-\r
-{% email %}\r
- {% subject %}{% blocktrans %}{{ newmember_name }} is a new member on {{ app_name }}{% endblocktrans %}{% endsubject %}\r
-\r
- {% htmlcontent notifications/base.html %}\r
- <p style="{{ p_style }}">\r
- {% blocktrans %}\r
- {{ newmember_name }} has just joined {{ app_name }}. You can visit {{ newmember_name }}'s profile using the following link: <br />\r
- <a href="{{ app_url }}{{ newmember_url }}">{{ newmember_name }} profile</a>\r
- {% endblocktrans %}\r
- </p>\r
- {% endhtmlcontent %}\r
-\r
- {% textcontent notifications/base_text.html %}\r
- {% blocktrans %}\r
- {{ newmember_name }} has just joined {{ app_name }}. You can visit {{ newmember_name }}'s profile using the following url: <br />\r
- {{ app_url }}{{ newmember_url }}\r
- {% endblocktrans %}\r
- {% endtextcontent %}\r
-\r
-{% endemail %}\r
-\r
+{% load i18n extra_tags email_tags %}
+
+{% declare %}
+ prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
+ app_name = smart_str(settings.APP_SHORT_NAME)
+ safe_app_name = html.mark_safe(smart_str(settings.APP_SHORT_NAME))
+ app_url = smart_str(settings.APP_URL)
+ newmember_name = smart_str(newmember.username)
+ safe_newmember_name = html.mark_safe(smart_str(newmember.username))
+ newmember_url = smart_str(newmember.get_profile_url())
+ newmember_link = html.objlink(newmember, style=settings.EMAIL_ANCHOR_STYLE)
+{% enddeclare %}
+
+{% email %}
+ {% subject %}{% blocktrans %}{{ prefix }} {{ safe_newmember_name }} is a new member on {{ safe_app_name }}{% endblocktrans %}{% endsubject %}
+
+ {% htmlcontent notifications/base.html %}
+ <p style="{{ p_style }}">
+ {% blocktrans %}
+ {{ newmember_link }} has just joined {{ app_name }}.
+ View <a style="{{ a_style }}" href="{{ app_url }}{{ newmember_url }}">{{ newmember_name }}'s profile</a>.
+ {% endblocktrans %}
+ </p>
+ {% endhtmlcontent %}
+
+{% textcontent notifications/base_text.html %}
+{% blocktrans %}
+{{ safe_newmember_name }} has just joined {{ safe_app_name }}. You can visit {{ safe_newmember_name }}'s profile using the following url:
+{{ app_url }}{{ newmember_url }}
+{% endblocktrans %}
+{% endtextcontent %}
+
+{% endemail %}
+