From 115c65aa182c5de21fa13f7056bc7727ba64f892 Mon Sep 17 00:00:00 2001 From: Daniel Valenzuela Date: Wed, 25 Oct 2023 20:16:44 -0300 Subject: [PATCH] fix: flags not at the start of the expression related issue: https://github.com/openedx/edx-platform/issues/33585 --- xmodule/modulestore/store_utilities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmodule/modulestore/store_utilities.py b/xmodule/modulestore/store_utilities.py index ced5c9728ec0..e9710fbc92ce 100644 --- a/xmodule/modulestore/store_utilities.py +++ b/xmodule/modulestore/store_utilities.py @@ -17,11 +17,11 @@ def _prefix_only_url_replace_regex(pattern): Match urls in quotes pulling out the fields from pattern """ return re.compile(""" - (?x) # flags=re.VERBOSE (?P\\\\?['"]) # the opening quotes {} (?P=quote) # the first matching closing quote - """.format(pattern)) + """.format(pattern), + flags=re.VERBOSE) def rewrite_nonportable_content_links(source_course_id, dest_course_id, text):