diff --git a/lib/core/common.py b/lib/core/common.py index 6bbe947e4..3740365de 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2503,7 +2503,10 @@ def extractTextTagContent(page): page = page or "" if REFLECTED_VALUE_MARKER in page: - page = re.sub(r"(?si)[^\s>]*%s[^\s<]*" % REFLECTED_VALUE_MARKER, "", page) + try: + page = re.sub(r"(?i)[^\s>]*%s[^\s<]*" % REFLECTED_VALUE_MARKER, "", page) + except MemoryError: + page = page.replace(REFLECTED_VALUE_MARKER, "") return filter(None, (_.group('result').strip() for _ in re.finditer(TEXT_TAG_REGEX, page)))