From a2c979b81d9bf19dc8f9e4446a82b84154a24b1b Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 22 Jul 2014 11:48:28 +0100 Subject: [PATCH] [#1436] Fix encoding error on user form when using email notifications If the site title had special characters an encoding error was raised, as the site title was an unicode string but the helper text wasn't. We used the Jinja2 "string" filter to fix this. Translations should not be affected so this can be backported. --- ckan/templates/user/edit_user_form.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckan/templates/user/edit_user_form.html b/ckan/templates/user/edit_user_form.html index 691a51317c6..7bd64d99a84 100644 --- a/ckan/templates/user/edit_user_form.html +++ b/ckan/templates/user/edit_user_form.html @@ -16,7 +16,8 @@ {% if c.show_email_notifications %} {% call form.checkbox('activity_streams_email_notifications', label=_('Subscribe to notification emails'), id='field-activity-streams-email-notifications', value=True, checked=c.userobj.activity_streams_email_notifications) %} - {{ form.info(_("You will receive notification emails from {site_title}, e.g. when you have new activities on your dashboard.".format(site_title=g.site_title)), classes=['info-help-tight']) }} + {% set helper_text = _("You will receive notification emails from {site_title}, e.g. when you have new activities on your dashboard."|string) %} + {{ form.info(helper_text.format(site_title=g.site_title), classes=['info-help-tight']) }} {% endcall %} {% endif %}