From b81a15d57f6ff72dda8ba3b8d8db3f21c95bcd8a Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 23 Mar 2016 15:56:22 -0400 Subject: [PATCH] XSS escape cms/templates/course_outline.html --- cms/djangoapps/contentstore/views/course.py | 5 +---- cms/templates/course_outline.html | 13 ++++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cms/djangoapps/contentstore/views/course.py b/cms/djangoapps/contentstore/views/course.py index 9670ee3cf5..abcbb67397 100644 --- a/cms/djangoapps/contentstore/views/course.py +++ b/cms/djangoapps/contentstore/views/course.py @@ -553,11 +553,8 @@ def _deprecated_blocks_info(course_module, deprecated_block_types): except errors.CourseStructureNotAvailableError: return data - blocks = [] for block in structure_data['blocks'].values(): - blocks.append([reverse_usage_url('container_handler', block['parent']), block['display_name']]) - - data['blocks'].extend(blocks) + data['blocks'].append([reverse_usage_url('container_handler', block['parent']), block['display_name']]) return data diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html index 6c1f97d90e..16b34e31fe 100644 --- a/cms/templates/course_outline.html +++ b/cms/templates/course_outline.html @@ -1,3 +1,4 @@ +<%page expression_filter="h"/> <%inherit file="base.html" /> <%def name="online_help_token()"><% return "outline" %> <%! @@ -7,6 +8,7 @@ from django.utils.translation import ugettext as _ from openedx.core.djangolib.js_utils import dump_js_escaped_json from contentstore.utils import reverse_usage_url from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration +from openedx.core.djangolib.markup import Text, HTML %> <%block name="title">${_("Course Outline")} <%block name="bodyclass">is-signedin course view-outline @@ -71,7 +73,7 @@ from openedx.core.djangoapps.self_paced.models import SelfPacedConfiguration % for component_parent_url, component_display_name in deprecated_blocks_info['blocks']: