diff --git a/cms/templates/widgets/video/codemirror-edit.html b/cms/templates/widgets/video/codemirror-edit.html index 1db705e0cad6..b044667b3d09 100644 --- a/cms/templates/widgets/video/codemirror-edit.html +++ b/cms/templates/widgets/video/codemirror-edit.html @@ -1,13 +1,13 @@ <%! from django.utils.translation import ugettext as _ %> -<%page args="tabName"/> +<%page args="tabName" expression_filter="h"/>
- +
% endfor -
+
diff --git a/common/static/common/js/components/utils/view_utils.js b/common/static/common/js/components/utils/view_utils.js index 080f9418b16b..64ac2fcbd2eb 100644 --- a/common/static/common/js/components/utils/view_utils.js +++ b/common/static/common/js/components/utils/view_utils.js @@ -6,8 +6,8 @@ /* RequireJS */ define(['jquery', 'underscore', 'gettext', 'common/js/components/views/feedback_notification', - 'common/js/components/views/feedback_prompt'], - function($, _, gettext, NotificationView, PromptView) { + 'common/js/components/views/feedback_prompt', 'edx-ui-toolkit/js/utils/html-utils'], + function($, _, gettext, NotificationView, PromptView, HtmlUtils) { /* End RequireJS */ /* Webpack define(['jquery', 'underscore', 'gettext', 'common/js/components/views/feedback_notification', @@ -247,10 +247,17 @@ }; checkTotalKeyLengthViolations = function(selectors, classes, keyFieldSelectors, messageTpl) { + var tempHtml; if (!validateTotalKeyLength(keyFieldSelectors)) { $(selectors.errorWrapper).addClass(classes.shown).removeClass(classes.hiding); - $(selectors.errorMessage).html( - '

' + _.template(messageTpl)({limit: MAX_SUM_KEY_LENGTH}) + '

' + tempHtml = HtmlUtils.joinHtml( + HtmlUtils.HTML('

'), + HtmlUtils.template(messageTpl)({limit: MAX_SUM_KEY_LENGTH}), + HtmlUtils.HTML('

') + ); + HtmlUtils.setHtml( + $(selectors.errorMessage), + tempHtml ); $(selectors.save).addClass(classes.disabled); } else { diff --git a/common/static/common/templates/components/paginated-view.underscore b/common/static/common/templates/components/paginated-view.underscore index 55f161b55ab2..3ee1e590a0bf 100644 --- a/common/static/common/templates/components/paginated-view.underscore +++ b/common/static/common/templates/components/paginated-view.underscore @@ -1,4 +1,4 @@ -
-
- - +
+
+ + diff --git a/common/static/common/templates/components/tabpanel.underscore b/common/static/common/templates/components/tabpanel.underscore index a4288e6c9cd3..41e0f2d7b44a 100644 --- a/common/static/common/templates/components/tabpanel.underscore +++ b/common/static/common/templates/components/tabpanel.underscore @@ -1 +1 @@ - + diff --git a/lms/djangoapps/discussion/templates/discussion/edx_ace/responsenotification/email/body.html b/lms/djangoapps/discussion/templates/discussion/edx_ace/responsenotification/email/body.html index 71c88ae73fec..8eb7c8a30387 100644 --- a/lms/djangoapps/discussion/templates/discussion/edx_ace/responsenotification/email/body.html +++ b/lms/djangoapps/discussion/templates/discussion/edx_ace/responsenotification/email/body.html @@ -1,18 +1,17 @@ {% extends 'ace_common/edx_ace/common/base_body.html' %} {% load i18n %} +{% load django_markup %} {% load static %} {% block content %}

- {% filter force_escape %} {% blocktrans trimmed asvar replied_to_text %} - {{ comment_username }} replied to + {{ comment_username }} replied to {start_tag}{{ thread_title }}{end_tag}: {% endblocktrans %} - {% endfilter %} - {{ replied_to_text }} {{ thread_title }}: + {% interpolate_html replied_to_text start_tag=''|safe end_tag=''|safe %}

<%= membership_message %> +<%- membership_message %>
    <% _.each(memberships, function (membership) { %>
  • <%- membership.user.username %>
  • diff --git a/lms/static/js/discovery/views/courses_listing.js b/lms/static/js/discovery/views/courses_listing.js index c9bf0da98b1f..65413c62dbdf 100644 --- a/lms/static/js/discovery/views/courses_listing.js +++ b/lms/static/js/discovery/views/courses_listing.js @@ -4,8 +4,9 @@ 'underscore', 'backbone', 'gettext', - 'js/discovery/views/course_card' - ], function($, _, Backbone, gettext, CourseCardView) { + 'js/discovery/views/course_card', + 'edx-ui-toolkit/js/utils/html-utils' + ], function($, _, Backbone, gettext, CourseCardView, HtmlUtils) { 'use strict'; return Backbone.View.extend({ @@ -38,7 +39,10 @@ var item = new CourseCardView({model: result}); return item.render().el; }, this); - this.$list.append(items); + HtmlUtils.append( + this.$list, + HtmlUtils.HTML(items) + ); /* eslint no-param-reassign: [2, { "props": false }] */ }, diff --git a/lms/static/js/student_account/views/HintedLoginView.js b/lms/static/js/student_account/views/HintedLoginView.js index 74793304e901..720ded988b4a 100644 --- a/lms/static/js/student_account/views/HintedLoginView.js +++ b/lms/static/js/student_account/views/HintedLoginView.js @@ -1,7 +1,7 @@ (function(define) { 'use strict'; - define(['jquery', 'underscore', 'backbone'], - function($, _, Backbone) { + define(['jquery', 'underscore', 'backbone', 'edx-ui-toolkit/js/utils/html-utils'], + function($, _, Backbone, HtmlUtils) { return Backbone.View.extend({ el: '#hinted-login-form', @@ -22,10 +22,12 @@ }, render: function() { - $(this.el).html(_.template(this.tpl)({ - hintedProvider: this.hintedProvider - })); - + HtmlUtils.setHtml( + $(this.el), + HtmlUtils.template(this.tpl)({ + hintedProvider: this.hintedProvider + }) + ); return this; }, diff --git a/lms/static/js/student_account/views/InstitutionLoginView.js b/lms/static/js/student_account/views/InstitutionLoginView.js index d466d15c1991..dbda7e6dee13 100644 --- a/lms/static/js/student_account/views/InstitutionLoginView.js +++ b/lms/static/js/student_account/views/InstitutionLoginView.js @@ -1,7 +1,7 @@ (function(define) { 'use strict'; - define(['jquery', 'underscore', 'backbone'], - function($, _, Backbone) { + define(['jquery', 'underscore', 'backbone', 'edx-ui-toolkit/js/utils/html-utils'], + function($, _, Backbone, HtmlUtils) { return Backbone.View.extend({ el: '#institution_login-form', @@ -13,13 +13,15 @@ }, render: function() { - $(this.el).html(_.template(this.tpl)({ - // We pass the context object to the template so that - // we can perform variable interpolation using sprintf - providers: this.providers, - platformName: this.platformName - })); - + HtmlUtils.setHtml( + $(this.el), + HtmlUtils.template(this.tpl)({ + // We pass the context object to the template so that + // we can perform variable interpolation using sprintf + providers: this.providers, + platformName: this.platformName + }) + ); return this; } });