From 2fe0bf5a98e2daa8461df74cc6e44feac3273e5e Mon Sep 17 00:00:00 2001 From: Andrew Gaylard Date: Thu, 18 Feb 2016 22:19:45 +0200 Subject: [PATCH 1/2] Fix TNL-3429. --- cms/djangoapps/contentstore/views/item.py | 4 ++-- cms/templates/js/course-outline.underscore | 4 ++-- cms/templates/js/unit-outline.underscore | 2 +- cms/templates/js/xblock-outline.underscore | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 9105ee2067..130ef01bb0 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -886,7 +886,7 @@ def create_xblock_info(xblock, data=None, metadata=None, include_ancestor_info=F xblock_info = { "id": unicode(xblock.location), - "display_name": xblock.display_name_with_default_escaped, + "display_name": xblock.display_name_with_default, "category": xblock.category, "edited_on": get_default_time_display(xblock.subtree_edited_on) if xblock.subtree_edited_on else None, "published": published, @@ -1158,4 +1158,4 @@ def _xblock_type_and_display_name(xblock): """ return _('{section_or_subsection} "{display_name}"').format( section_or_subsection=xblock_type_display_name(xblock), - display_name=xblock.display_name_with_default_escaped) + display_name=xblock.display_name_with_default) diff --git a/cms/templates/js/course-outline.underscore b/cms/templates/js/course-outline.underscore index 8d0f4a8eb2..235761c37d 100644 --- a/cms/templates/js/course-outline.underscore +++ b/cms/templates/js/course-outline.underscore @@ -85,11 +85,11 @@ if (is_proctored_exam) { <% } %> <% if (xblockInfo.isVertical()) { %> - <%= xblockInfo.get('display_name') %> + <%- xblockInfo.get('display_name') %> <% } else { %> "> - <%= xblockInfo.get('display_name') %> + <%- xblockInfo.get('display_name') %> <% } %> diff --git a/cms/templates/js/unit-outline.underscore b/cms/templates/js/unit-outline.underscore index 191e10f0d7..7e2685716d 100644 --- a/cms/templates/js/unit-outline.underscore +++ b/cms/templates/js/unit-outline.underscore @@ -4,7 +4,7 @@

- <%= xblockInfo.get('display_name') %> + <%- xblockInfo.get('display_name') %>

diff --git a/cms/templates/js/xblock-outline.underscore b/cms/templates/js/xblock-outline.underscore index c4cdc9ef9c..9c8c01475a 100644 --- a/cms/templates/js/xblock-outline.underscore +++ b/cms/templates/js/xblock-outline.underscore @@ -17,10 +17,10 @@ <% } %> <% if (xblockInfo.get('studio_url') && xblockInfo.get('category') !== 'chapter') { %> - <%= xblockInfo.get('display_name') %> + <%- xblockInfo.get('display_name') %> <% } else { %> - <%= xblockInfo.get('display_name') %> + <%- xblockInfo.get('display_name') %> <% } %> From f1c1c7c1466fcc2bd3c5d4c5e1d0c42518811ade Mon Sep 17 00:00:00 2001 From: Jonathan Piacenti Date: Wed, 2 Mar 2016 15:05:28 +0000 Subject: [PATCH 2/2] Fix escaping issue in studio xblock wrapper for display name. --- cms/templates/studio_xblock_wrapper.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/templates/studio_xblock_wrapper.html b/cms/templates/studio_xblock_wrapper.html index 9cee2fda1f..7152d84493 100644 --- a/cms/templates/studio_xblock_wrapper.html +++ b/cms/templates/studio_xblock_wrapper.html @@ -11,7 +11,7 @@ xblock_url = xblock_studio_url(xblock) show_inline = xblock.has_children and not xblock_url section_class = "level-nesting" if show_inline else "level-element" collapsible_class = "is-collapsible" if xblock.has_children else "" -label = xblock.display_name_with_default_escaped or xblock.scope_ids.block_type +label = xblock.display_name_with_default or xblock.scope_ids.block_type messages = xblock.validate().to_json() %>