diff --git a/cms/djangoapps/contentstore/views/tests/test_programs.py b/cms/djangoapps/contentstore/views/tests/test_programs.py index 751f39f598..fc5f2df2d2 100644 --- a/cms/djangoapps/contentstore/views/tests/test_programs.py +++ b/cms/djangoapps/contentstore/views/tests/test_programs.py @@ -10,7 +10,7 @@ from provider.constants import CONFIDENTIAL from openedx.core.djangoapps.programs.models import ProgramsApiConfig from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin, ProgramsDataMixin -from openedx.core.djangolib.markup import escape +from openedx.core.djangolib.markup import Text from student.tests.factories import UserFactory from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase @@ -64,7 +64,7 @@ class TestProgramListing(ProgramsApiConfigMixin, ProgramsDataMixin, SharedModule self.mock_programs_api(data={'results': []}) response = self.client.get(self.studio_home) - self.assertIn(escape("You haven't created any programs yet."), response.content) + self.assertIn(Text("You haven't created any programs yet."), response.content) # When data is provided, expect a program listing. self.mock_programs_api() diff --git a/cms/templates/base.html b/cms/templates/base.html index 9691be94d0..5bba36a828 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -1,7 +1,8 @@ ## coding=utf-8 <%namespace name='static' file='static_content.html'/> <%! -from openedx.core.djangolib.markup import ugettext as _ +from django.utils.translation import ugettext as _ + from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) diff --git a/cms/templates/container.html b/cms/templates/container.html index 60b593560a..872031c4c4 100644 --- a/cms/templates/container.html +++ b/cms/templates/container.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%inherit file="base.html" /> <%def name="online_help_token()"> <% @@ -8,27 +9,30 @@ else: %> <%! +from django.utils.translation import ugettext as _ + from contentstore.views.helpers import xblock_studio_url, xblock_type_display_name from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) -from openedx.core.djangolib.markup import HTML, ugettext as _ +from openedx.core.djangolib.markup import Text, HTML %> -<%block name="title">${xblock.display_name_with_default_escaped} ${xblock_type_display_name(xblock) | h} + +<%block name="title">${xblock.display_name_with_default} ${xblock_type_display_name(xblock)} <%block name="bodyclass">is-signedin course container view-container <%namespace name='static' file='static_content.html'/> <%block name="header_extras"> % for template_name in templates: - % endfor - + <%block name="requirejs"> @@ -57,15 +61,15 @@ from openedx.core.djangolib.markup import HTML, ugettext as _ ancestor_url = xblock_studio_url(ancestor) %> % if ancestor_url: - ${ancestor.display_name_with_default_escaped | h} + ${ancestor.display_name_with_default} % else: - ${ancestor.display_name_with_default_escaped | h} + ${ancestor.display_name_with_default} % endif % endfor
-

${xblock.display_name_with_default_escaped | h}

+

${xblock.display_name_with_default}

@@ -74,12 +78,12 @@ from openedx.core.djangolib.markup import HTML, ugettext as _