Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 367627c

Browse files
committed
minor fix for Python 2.6
1 parent 76fb6ba commit 367627c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ def getFilteredPageContent(page, onlyText=True):
15861586

15871587
# only if the page's charset has been successfully identified
15881588
if isinstance(page, unicode):
1589-
retVal = re.sub(r"(?s)<script.+?</script>|<!--.+?-->|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page, flags=re.I)
1589+
retVal = re.sub(r"(?si)<script.+?</script>|<!--.+?-->|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page)
15901590

15911591
while retVal.find(" ") != -1:
15921592
retVal = retVal.replace(" ", " ")

0 commit comments

Comments
 (0)