From b36af3930d7cae2a22d0a2300e6a1e67c0b896e1 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Wed, 28 Oct 2020 11:20:41 +0500 Subject: [PATCH] Fixed Alert issue in lbirary editor (#25433) --- common/lib/xmodule/xmodule/library_content_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index 14b01810f4..3cca2e6f7a 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -11,6 +11,7 @@ from copy import copy from gettext import ngettext import six +import bleach from lazy import lazy from lxml import etree from opaque_keys.edx.locator import LibraryLocator @@ -623,7 +624,7 @@ class LibraryContentBlock( lib_tools = self.runtime.service(self, 'library_tools') user_perms = self.runtime.service(self, 'studio_user_permissions') all_libraries = [ - (key, name) for key, name in lib_tools.list_available_libraries() + (key, bleach.clean(name)) for key, name in lib_tools.list_available_libraries() if user_perms.can_read(key) or self.source_library_id == six.text_type(key) ] all_libraries.sort(key=lambda entry: entry[1]) # Sort by name