From 9ea24bf5e3a594636aaef18c9dad7c24abbbd015 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Wed, 23 Mar 2016 12:04:29 -0400 Subject: [PATCH] escape library.html show_children_previews was not being evaluated before --- cms/templates/library.html | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/cms/templates/library.html b/cms/templates/library.html index 50ffd7e3fb..33706dedf1 100644 --- a/cms/templates/library.html +++ b/cms/templates/library.html @@ -1,11 +1,15 @@ +<%page expression_filter="h"/> <%inherit file="base.html" /> -<%def name="online_help_token()"><% return "content_libraries" %> +<%def name="online_help_token()"> + <% return "content_libraries" %> + <%! from contentstore.views.helpers import xblock_studio_url, xblock_type_display_name from django.utils.translation import ugettext as _ from openedx.core.djangolib.js_utils import dump_js_escaped_json +from openedx.core.djangolib.markup import HTML, Text %> -<%block name="title">${context_library.display_name_with_default_escaped} ${xblock_type_display_name(context_library)} +<%block name="title">${context_library.display_name_with_default} ${xblock_type_display_name(context_library)} <%block name="bodyclass">is-signedin course container view-container view-library <%namespace name='static' file='static_content.html'/> @@ -29,8 +33,8 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json { isUnitPage: false, page_size: 10, - canEdit: ${"true" if can_edit else "false"}, - showChildrenPreviews: ${'true' if show_children_previews else 'false'} + canEdit: ${can_edit | n, dump_js_escaped_json}, + showChildrenPreviews: ${context_library.show_children_previews | n, dump_js_escaped_json} } ); }); @@ -45,7 +49,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json ${_("Content Library")}
-

${context_library.display_name_with_default_escaped}

+

${context_library.display_name_with_default}

@@ -74,7 +78,7 @@ from openedx.core.djangolib.js_utils import dump_js_escaped_json
-