From 87c9563da5caa8575e20811bcc3797aeede0a9c7 Mon Sep 17 00:00:00 2001 From: Dillon Dumesnil Date: Wed, 30 Oct 2019 14:27:20 -0400 Subject: [PATCH] Encoding course key for url DISCO-1422 --- cms/templates/widgets/header.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index ade1805677..9ba7fc9910 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -2,6 +2,7 @@ <%namespace name='static' file='../static_content.html'/> <%! import six + from six.moves.urllib.parse import quote from django.conf import settings from django.urls import reverse from django.utils.translation import ugettext as _ @@ -20,6 +21,7 @@ % if context_course: <% course_key = context_course.id + url_encoded_course_key = quote(six.text_type(course_key), safe='') index_url = reverse('course_handler', kwargs={'course_key_string': six.text_type(course_key)}) course_team_url = reverse('course_team_handler', kwargs={'course_key_string': six.text_type(course_key)}) assets_url = reverse('assets_handler', kwargs={'course_key_string': six.text_type(course_key)}) @@ -108,7 +110,7 @@ % endif % if frontend_app_publisher_url: % endif