diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 2cfa82bcc6..44e9cc8df5 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%namespace name='static' file='../static_content.html'/> <%! from django.conf import settings @@ -36,8 +37,8 @@
- ${_("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/lms/templates/footer.html b/lms/templates/footer.html index 7264422d4f..1ca055d128 100644 --- a/lms/templates/footer.html +++ b/lms/templates/footer.html @@ -1,4 +1,5 @@ ## mako +<%page expression_filter="h"/> <%! from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ diff --git a/lms/templates/header.html b/lms/templates/header.html index 7cd5ee065e..e62672d373 100644 --- a/lms/templates/header.html +++ b/lms/templates/header.html @@ -1,3 +1,4 @@ ## mako +<%page expression_filter="h"/> <%namespace name='static' file='static_content.html'/> <%include file="${static.get_themed_template_path(relative_path='theme-header.html', default_path='navigation.html')}" /> diff --git a/lms/templates/help_modal.html b/lms/templates/help_modal.html index 7c204327cf..25e413fe95 100644 --- a/lms/templates/help_modal.html +++ b/lms/templates/help_modal.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%namespace name='static' file='static_content.html'/> <%! @@ -6,6 +7,8 @@ import pytz from django.conf import settings from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse +from openedx.core.djangolib.js_utils import js_escaped_string +from openedx.core.djangolib.markup import Text, HTML from xmodule.tabs import CourseTabList %> @@ -28,8 +31,8 @@ from xmodule.tabs import CourseTabList${_('For questions on course lectures, homework, tools, or materials for this course, post in the {link_start}course discussion forum{link_end}.').format( - link_start=''.format(url=discussion_link), - link_end='', +
${Text(_('For {strong_start}questions on course lectures, homework, tools, or materials for this course{strong_end}, post in the {link_start}course discussion forum{link_end}.')).format( + strong_start=HTML(''), + strong_end=HTML(''), + link_start=HTML('').format( + url=discussion_link + ), + link_end=HTML(''), )}
% endif -${_('Have general questions about {platform_name}? You can find lots of helpful information in the {platform_name} {link_start}FAQ{link_end}.').format(
- link_start=''.format(
+ ${Text(_('Have {strong_start}general questions about {platform_name}{strong_end}? You can find lots of helpful information in the {platform_name} {link_start}FAQ{link_end}.')).format(
+ strong_start=HTML(''),
+ strong_end=HTML(''),
+ link_start=HTML('').format(
url=marketing_link('FAQ')
),
- link_end='',
+ link_end=HTML('
${_('Have a question about something specific? You can contact the {platform_name} general support team directly:').format( +
${Text(_('Have a {strong_start}question about something specific{strong_end}? You can contact the {platform_name} general support team directly:')).format( + strong_start=HTML(''), + strong_end=HTML(''), platform_name=static.get_platform_name() )}
- ${_( + ${Text(_( 'Thank you for your inquiry or feedback. We typically respond to a request ' 'within one business day (Monday to Friday, {open_time} UTC to {close_time} UTC.) In the meantime, please ' 'review our {link_start}detailed FAQs{link_end} where most questions have ' 'already been answered.' - ).format( + )).format( open_time=open_time, close_time=close_time, - link_start=''.format(marketing_link('FAQ')), - link_end='' + link_start=HTML('').format(marketing_link('FAQ')), + link_end=HTML('') )}