diff --git a/cms/static/js/views/content_group_details.js b/cms/static/js/views/content_group_details.js index 4357b04aaa..4b6ed76820 100644 --- a/cms/static/js/views/content_group_details.js +++ b/cms/static/js/views/content_group_details.js @@ -75,18 +75,18 @@ define([ }, getOutlineAnchorMessage: function () { - var message = gettext( + var message = _.escape(gettext( /* Translators: 'outlineAnchor' is an anchor pointing to the course outline page. */ 'This content group is not in use. Add a content group to any unit from the %(outlineAnchor)s.' - ), + )), anchor = str.sprintf( '%(text)s', { url: this.model.collection.parents[0].outlineUrl, - text: gettext('Course Outline') + text: _.escape(gettext('Course Outline')) } ); diff --git a/cms/templates/js/content-group-details.underscore b/cms/templates/js/content-group-details.underscore index b5bc267411..670fab89fb 100644 --- a/cms/templates/js/content-group-details.underscore +++ b/cms/templates/js/content-group-details.underscore @@ -3,7 +3,7 @@
- <%= outlineAnchorMessage %> + + <%= outlineAnchorMessage %>
<% } %><% if (unit.validation.type === 'warning') { %> @@ -71,7 +71,7 @@ <% } %>
<% } %> @@ -80,6 +80,7 @@+ <%= outlineAnchorMessage %>
<% } %> diff --git a/lms/templates/instructor/instructor_dashboard_2/cohort_management.html b/lms/templates/instructor/instructor_dashboard_2/cohort_management.html index 71d5fe0dfc..81fe4c4221 100644 --- a/lms/templates/instructor/instructor_dashboard_2/cohort_management.html +++ b/lms/templates/instructor/instructor_dashboard_2/cohort_management.html @@ -2,6 +2,7 @@ <%namespace name='static' file='../../static_content.html'/> <%! from django.utils.translation import ugettext as _ +from openedx.core.djangolib.js_utils import js_escaped_string from courseware.courses import get_studio_url from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition %> @@ -27,7 +28,7 @@ from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_ % for content_group in content_groups: { id: ${content_group.id}, - name: "${content_group.name | h}", + name: "${content_group.name | n, js_escaped_string}", user_partition_id: cohortUserPartitionId }, % endfor