PROD-2253

This commit is contained in:
Ali-D-Akbar
2021-02-08 19:42:19 +05:00
parent f16d4d943e
commit f87507bdfa

View File

@@ -6,6 +6,8 @@ allows us to share code between the XModuleMixin and CourseOverview and
BlockStructure.
"""
from markupsafe import escape
def url_name_for_block(block):
"""
@@ -77,4 +79,4 @@ def display_name_with_default_escaped(block):
# This escaping is incomplete. However, rather than switching this to use
# markupsafe.escape() and fixing issues, better to put that energy toward
# migrating away from this method altogether.
return display_name_with_default(block).replace('<', '&lt;').replace('>', '&gt;')
return escape(display_name_with_default(block))