diff --git a/xmodule/modulestore/store_utilities.py b/xmodule/modulestore/store_utilities.py index ced5c9728e..e9710fbc92 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):