From 5f7e1266e70f73ab13982097c4b5926412ea1d48 Mon Sep 17 00:00:00 2001 From: cahrens Date: Mon, 16 May 2016 16:07:32 -0400 Subject: [PATCH] Safe template cleanup. --- cms/templates/settings.html | 54 ++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 29967a2156..076adbdde7 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -1,6 +1,7 @@ +<%page expression_filter="h"/> <%inherit file="base.html" /> <%def name="online_help_token()"><% return "schedule" %> -<%block name="title">${_("Schedule & Details Settings")} +<%block name="title">${_("Schedule & Details Settings")} <%block name="bodyclass">is-signedin course schedule view-settings feature-upload <%namespace name='static' file='static_content.html'/> @@ -11,6 +12,7 @@ from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) + from openedx.core.djangolib.markup import HTML, Text %> <%block name="header_extras"> @@ -27,7 +29,7 @@ @@ -94,10 +96,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'
  • <% email_subject = urllib.quote(_("Enroll in {course_display_name}").format( - course_display_name = context_course.display_name_with_default_escaped + course_display_name = context_course.display_name_with_default ).encode("utf-8")) email_body = urllib.quote(_('The course "{course_display_name}", provided by {platform_name}, is open for enrollment. Please navigate to this course at {link_for_about_page} to enroll.').format( - course_display_name = context_course.display_name_with_default_escaped, + course_display_name = context_course.display_name_with_default, platform_name = settings.PLATFORM_NAME, link_for_about_page = link_for_about_page ).encode("utf-8")) @@ -226,7 +228,7 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'
  • <% - enrollment_end_readonly = "readonly aria-readonly=\"true\"" if not enrollment_end_editable else "" + enrollment_end_readonly = HTML("readonly aria-readonly=\"true\"") if not enrollment_end_editable else "" enrollment_end_editable_class = "is-not-editable" if not enrollment_end_editable else "" %>
  • @@ -253,11 +255,14 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'

    ${_("These Dates Are Not Used When Promoting Your Course")}

    -

    ${_( - 'These dates impact when your courseware can be viewed, ' - 'but they are not the dates shown on your course summary page. ' +

    ${Text(_( + 'These dates impact {strong_start}when your courseware can be viewed{strong_end}, ' + 'but they are {strong_start}not the dates shown on your course summary page{strong_end}. ' 'To provide the course start and registration dates as shown on your course ' 'summary page, follow the instructions provided by your Program Manager.' + )).format( + strong_start=HTML(''), + strong_end=HTML('') )}

    @@ -328,13 +333,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'
  • - <%def name='overview_text()'><% - a_link_start = '' + _("your course summary page") + '' - a_link = a_link_start + lms_link_for_about_page + a_link_end - text = _("Introductions, prerequisites, FAQs that are used on %s (formatted in HTML)") % a_link - %>${text} - ${overview_text()} + ${ + Text(_("Introductions, prerequisites, FAQs that are used on {a_link_start}your course summary page{a_link_end} (formatted in HTML)")).format( + a_link_start=HTML("").format(lms_link_for_about_page=lms_link_for_about_page), + a_link_end=HTML("") + )}
  • % endif @@ -347,7 +350,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}' - ${_("You can manage this image along with all of your other files & uploads").format(upload_asset_url)} + ${Text(_("You can manage this image along with all of your other {a_link_start}files and uploads{a_link_end}")).format( + a_link_start=HTML("").format(upload_asset_url=upload_asset_url), + a_link_end=HTML("") + )} % else: @@ -378,7 +384,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}' - ${_("You can manage this image along with all of your other files & uploads").format(upload_asset_url)} + ${Text(_("You can manage this image along with all of your other {a_link_start}files and uploads{a_link_end}")).format( + a_link_start=HTML("").format(upload_asset_url=upload_asset_url), + a_link_end=HTML("") + )} % else: @@ -408,7 +417,10 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}' - ${_("You can manage this image along with all of your other files & uploads").format(upload_asset_url)} + ${Text(_("You can manage this image along with all of your other {a_link_start}files and uploads{a_link_end}")).format( + a_link_start=HTML("").format(upload_asset_url=upload_asset_url), + a_link_end=HTML("") + )} % else: @@ -525,7 +537,11 @@ CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'