This commit is contained in:
Miroslav Stampar 2015-08-30 01:58:43 +02:00
parent 06c8704179
commit 737a37bfda

View File

@ -2603,11 +2603,11 @@ def removeDynamicContent(page):
if prefix is None and suffix is None: if prefix is None and suffix is None:
continue continue
elif prefix is None: elif prefix is None:
page = re.sub(r'(?s)^.+%s' % re.escape(suffix), suffix, page) page = re.sub(r'(?s)^.+%s' % re.escape(suffix), suffix.replace('\\', r'\\'), page)
elif suffix is None: elif suffix is None:
page = re.sub(r'(?s)%s.+$' % re.escape(prefix), prefix, page) page = re.sub(r'(?s)%s.+$' % re.escape(prefix), prefix.replace('\\', r'\\'), page)
else: else:
page = re.sub(r'(?s)%s.+%s' % (re.escape(prefix), re.escape(suffix)), '%s%s' % (prefix, suffix), page) page = re.sub(r'(?s)%s.+%s' % (re.escape(prefix), re.escape(suffix)), '%s%s' % (prefix.replace('\\', r'\\'), suffix.replace('\\', r'\\')), page)
return page return page