diff --git a/common/djangoapps/student/tests/tests.py b/common/djangoapps/student/tests/tests.py index 0566460dd1..a688cc66f4 100644 --- a/common/djangoapps/student/tests/tests.py +++ b/common/djangoapps/student/tests/tests.py @@ -249,11 +249,14 @@ class DashboardTest(ModuleStoreTestCase): Test that the certificate verification status for courses is visible on the dashboard. """ self.client.login(username="jack", password="test") - self._check_verification_status_on('verified', 'You\'re enrolled as a verified student') - self._check_verification_status_on('honor', 'You\'re enrolled as an honor code student') + self._check_verification_status_on('verified', 'You're enrolled as a verified student') + self._check_verification_status_on('honor', 'You're enrolled as an honor code student') self._check_verification_status_off('audit', '') - self._check_verification_status_on('professional', 'You\'re enrolled as a professional education student') - self._check_verification_status_on('no-id-professional', 'You\'re enrolled as a professional education student') + self._check_verification_status_on('professional', 'You're enrolled as a professional education student') + self._check_verification_status_on( + 'no-id-professional', + 'You're enrolled as a professional education student', + ) @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') def _check_verification_status_off(self, mode, value): diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 54861f320e..c8c67aac69 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -1,12 +1,13 @@ +<%page expression_filter="h"/> <%inherit file="main.html" /> <%namespace name='static' file='static_content.html'/> <%! +from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from django.template import RequestContext import third_party_auth from third_party_auth import pipeline -from django.core.urlresolvers import reverse -import json +from openedx.core.djangolib.js_utils import dump_js_escaped_json, js_escaped_string %> <% @@ -39,9 +40,9 @@ import json @@ -54,7 +55,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}) % endif @@ -117,7 +118,7 @@ import json

${_("Course-loading errors")}

% for course_dir, errors in errored_courses.items(): -

${course_dir | h}

+

${course_dir}