From 3ebb3e6f4f5df3fe234e394e6acce77f40a99d50 Mon Sep 17 00:00:00 2001 From: KingX Date: Sat, 22 Aug 2015 14:05:03 +0800 Subject: [PATCH] fix removeDynamicContent bug double re.escape() in "findDynamicContent" function and "removeDynamicContent" function leads an bug in finding dynamic content, --- lib/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index a12bd8d35..18b78e05d 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2580,7 +2580,7 @@ def findDynamicContent(firstPage, secondPage): prefix = trimAlphaNum(prefix) suffix = trimAlphaNum(suffix) - 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)) + kb.dynamicMarkings.append((prefix[-DYNAMICITY_MARK_LENGTH / 2:] if prefix else None, suffix[:DYNAMICITY_MARK_LENGTH / 2] if suffix else None)) if len(kb.dynamicMarkings) > 0: infoMsg = "dynamic content marked for removal (%d region%s)" % (len(kb.dynamicMarkings), 's' if len(kb.dynamicMarkings) > 1 else '')