From 6eec5ac4725faa1f8d7703552f423de036d571b9 Mon Sep 17 00:00:00 2001
From: Nimisha Asthagiri ${_("Course-loading errors")}
% for course_dir, errors in errored_courses.items():
- ${course_dir | h}
+ ${course_dir}
% for (msg, err) in errors:
+
% else:
-
+
% endif
% else:
-
+
% endif
% if settings.FEATURES.get('ENABLE_VERIFIED_CERTIFICATES') and course_verified_certs.get('display_mode') != 'audit':
@@ -89,17 +89,17 @@ from student.helpers import (
% if show_courseware_link:
% if not is_course_blocked:
- ${course_overview.display_name_with_default_escaped}
+ ${course_overview.display_name_with_default}
% else:
- ${course_overview.display_name_with_default_escaped}
+ ${course_overview.display_name_with_default}
% endif
% else:
- ${course_overview.display_name_with_default_escaped}
+ ${course_overview.display_name_with_default}
% endif
${_('You have already verified your ID!')}
@@ -317,7 +317,7 @@ from student.helpers import (
${_('Your verification will expire soon!')}
## Translators: start_link and end_link will be replaced with HTML tags;
## please do not translate these.
-
+
% endif
- ${_("It's official. It's easily shareable. It's a proven motivator to complete the course.
{link_start}Learn more about the verified {cert_name_long}{link_end}.").format(link_start=''.format(marketing_link('WHAT_IS_VERIFIED_CERT'), enrollment.course_id), link_end="", cert_name_long=cert_name_long)}
+ ${Text(_("It's official. It's easily shareable. "
+ "It's a proven motivator to complete the course. {line_break}"
+ "{link_start}Learn more about the verified {cert_name_long}{link_end}.")).format(
+ line_break=HTML('
'),
+ link_start=HTML(''.format(
+ marketing_link('WHAT_IS_VERIFIED_CERT'),
+ enrollment.course_id
+ )),
+ link_end=HTML(''),
+ cert_name_long=cert_name_long
+ )}
- ${_("You can no longer access this course because payment has not yet been received. " + ${Text(_("You can no longer access this course because payment has not yet been received. " "You can {contact_link_start}contact the account holder{contact_link_end} " "to request payment, or you can " "{unenroll_link_start}unenroll{unenroll_link_end} " - "from this course").format( - contact_link_start='', - contact_link_end='', - unenroll_link_start=( + "from this course")).format( + contact_link_start=HTML(''), + contact_link_end=HTML(''), + unenroll_link_start=HTML( ''.format( - course_id=escape(course_overview.id), - course_number=escape(course_overview.number), - course_name=escape(course_overview.display_name_with_default_escaped), - ) + 'href="#unenroll-modal">' + ).format( + course_id=course_overview.id, + course_number=course_overview.number, + course_name=course_overview.display_name_with_default, ), - unenroll_link_end="", + unenroll_link_end=HTML('
'), )} %endif @@ -383,9 +393,9 @@ from student.helpers import ( <% prc_target = reverse('about_course', args=[unicode(course_requirements['courses'][0]['key'])]) %>- ${_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.").format( - link_start=''.format(prc_target), - link_end='', + ${Text(_("You must successfully complete {link_start}{prc_display}{link_end} before you begin this course.")).format( + link_start=HTML(''.format(prc_target)), + link_end=HTML(''), prc_display=course_requirements['courses'][0]['display'], )}
diff --git a/lms/templates/dashboard/_dashboard_status_verification.html b/lms/templates/dashboard/_dashboard_status_verification.html index 3b4db661f0..9c611476f4 100644 --- a/lms/templates/dashboard/_dashboard_status_verification.html +++ b/lms/templates/dashboard/_dashboard_status_verification.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%namespace name='static' file='../static_content.html'/> <%! from django.utils.translation import ugettext as _ diff --git a/themes/edx.org/lms/templates/dashboard.html b/themes/edx.org/lms/templates/dashboard.html index 410c08a35d..4bf5dbe0a4 100644 --- a/themes/edx.org/lms/templates/dashboard.html +++ b/themes/edx.org/lms/templates/dashboard.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%inherit file="main.html" /> <%namespace name='static' file='static_content.html'/> <%! @@ -8,6 +9,7 @@ from third_party_auth import pipeline from microsite_configuration import microsite from django.core.urlresolvers import reverse import json +from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string %> <% @@ -40,9 +42,9 @@ import json @@ -55,7 +57,7 @@ import json <%static:require_module module_name="js/views/message_banner" class_name="MessageBannerView"> var banner = new MessageBannerView({urgency: 'low', type: 'warning'}); $('#content').prepend(banner.$el); - banner.showMessage(${json.dumps(redirect_message)}) + banner.showMessage(${redirect_message | n, dump_js_escaped_json}) %static:require_module> % endif %block> @@ -118,7 +120,7 @@ import json