From f87507bdfaad5577c60a6a3bf6ba8e18c4297e4b Mon Sep 17 00:00:00 2001 From: Ali-D-Akbar Date: Mon, 8 Feb 2021 19:42:19 +0500 Subject: [PATCH] PROD-2253 --- common/lib/xmodule/xmodule/block_metadata_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/block_metadata_utils.py b/common/lib/xmodule/xmodule/block_metadata_utils.py index acc29055b8..8db6e37bc2 100644 --- a/common/lib/xmodule/xmodule/block_metadata_utils.py +++ b/common/lib/xmodule/xmodule/block_metadata_utils.py @@ -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('<', '<').replace('>', '>') + return escape(display_name_with_default(block))