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

Skip to content

Commit 3ebb3e6

Browse files
committed
fix removeDynamicContent bug
double re.escape() in "findDynamicContent" function and "removeDynamicContent" function leads an bug in finding dynamic content,
1 parent f609158 commit 3ebb3e6

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
@@ -2580,7 +2580,7 @@ def findDynamicContent(firstPage, secondPage):
25802580
prefix = trimAlphaNum(prefix)
25812581
suffix = trimAlphaNum(suffix)
25822582

2583-
kb.dynamicMarkings.append((re.escape(prefix[-DYNAMICITY_MARK_LENGTH / 2:]) if prefix else None, re.escape(suffix[:DYNAMICITY_MARK_LENGTH / 2]) if suffix else None))
2583+
kb.dynamicMarkings.append((prefix[-DYNAMICITY_MARK_LENGTH / 2:] if prefix else None, suffix[:DYNAMICITY_MARK_LENGTH / 2] if suffix else None))
25842584

25852585
if len(kb.dynamicMarkings) > 0:
25862586
infoMsg = "dynamic content marked for removal (%d region%s)" % (len(kb.dynamicMarkings), 's' if len(kb.dynamicMarkings) > 1 else '')

0 commit comments

Comments
 (0)