diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 9670ee3cf5..00cf07215f 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -90,6 +90,7 @@ from util.organizations_helpers import ( organizations_enabled, ) from util.string_utils import _has_non_ascii_characters +from util.course_key_utils import from_string_or_404 from xmodule.contentstore.content import StaticContent from xmodule.course_module import CourseFields from xmodule.course_module import DEFAULT_START_DATE @@ -868,10 +869,7 @@ def course_info_handler(request, course_key_string): GET html: return html for editing the course info handouts and updates. """ - try: - course_key = CourseKey.from_string(course_key_string) - except InvalidKeyError: - raise Http404 + course_key = from_string_or_404(course_key_string) with modulestore().bulk_operations(course_key): course_module = get_course_and_check_access(course_key, request.user) diff --git a/cms/templates/activation_complete.html b/cms/templates/activation_complete.html index 135f15764d..fa39f13ac8 100644 --- a/cms/templates/activation_complete.html +++ b/cms/templates/activation_complete.html @@ -1,10 +1,18 @@ -<%! from django.utils.translation import ugettext as _ %> +<%! +from openedx.core.djangolib.markup import Text +from django.utils.translation import ugettext as _ +%> +<%page expression_filter="h"/> <%inherit file="base.html" /> <%block name="content">
-

${_("{studio_name} Account Activation").format(studio_name=settings.STUDIO_SHORT_NAME)}

+

+ ${Text(_("{studio_name} Account Activation")).format( + studio_name=Text(settings.STUDIO_SHORT_NAME), + )} +

@@ -17,14 +25,20 @@

${_("Your account activation is complete!")}

-

${_("Thank you for activating your account. You may now sign in and start using {studio_name} to author courses.").format(studio_name=settings.STUDIO_NAME)}

+

+ ${Text(_("Thank you for activating your account. You may now sign in and start using {studio_name} to author courses.")).format( + studio_name=Text(settings.STUDIO_NAME) + )} +

diff --git a/cms/templates/activation_invalid.html b/cms/templates/activation_invalid.html index fd9e5a9e5f..66c5e06c9d 100644 --- a/cms/templates/activation_invalid.html +++ b/cms/templates/activation_invalid.html @@ -1,10 +1,18 @@ -<%! from django.utils.translation import ugettext as _ %> +<%! +from openedx.core.djangolib.markup import HTML, Text +from django.utils.translation import ugettext as _ +%> +<%page expression_filter="h"/> <%inherit file="base.html" /> <%block name="content">
-

${_("{studio_name} Account Activation").format(studio_name=settings.STUDIO_SHORT_NAME)}

+

+ ${Text(_("{studio_name} Account Activation")).format( + studio_name=Text(settings.STUDIO_SHORT_NAME) + )} +

@@ -18,10 +26,14 @@

${_("Your account activation is invalid")}

${_("We're sorry. Something went wrong with your activation. Check to make sure the URL you went to was correct, as e-mail programs will sometimes split it into two lines.")}

-

${_("If you still have issues, contact {platform_name} Support. In the meantime, you can also return to {link_start}the {studio_name} homepage.{link_end}").format( - platform_name=settings.PLATFORM_NAME, studio_name=settings.STUDIO_NAME, - link_start='', link_end="" - )}

+

+ ${Text(_("If you still have issues, contact {platform_name} Support. In the meantime, you can also return to {link_start}the {studio_name} homepage.{link_end}")).format( + platform_name=Text(settings.PLATFORM_NAME), + studio_name=Text(settings.STUDIO_NAME), + link_start=HTML(''), + link_end=HTML('') + )} +

diff --git a/cms/templates/dev/dev_mode.html b/cms/templates/dev/dev_mode.html index 9ee409d5de..71252bad1f 100644 --- a/cms/templates/dev/dev_mode.html +++ b/cms/templates/dev/dev_mode.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%inherit file="../base.html" /> <%block name="content"> You're in dev mode! diff --git a/cms/templates/ux/reference/index.html b/cms/templates/ux/reference/index.html index eeb956f495..4121778dcd 100644 --- a/cms/templates/ux/reference/index.html +++ b/cms/templates/ux/reference/index.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%inherit file="../../base.html" /> <%block name="view_notes"> diff --git a/cms/templates/ux/reference/modal_access-component.html b/cms/templates/ux/reference/modal_access-component.html index c52c26cc7e..7608244c3e 100644 --- a/cms/templates/ux/reference/modal_access-component.html +++ b/cms/templates/ux/reference/modal_access-component.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/>