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

Skip to content

Commit 358651b

Browse files
committed
Fixes #1313
1 parent 75ed5f7 commit 358651b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2482,7 +2482,9 @@ def extractTextTagContent(page):
24822482
[u'Title', u'foobar']
24832483
"""
24842484

2485-
page = re.sub(r"(?si)[^\s>]*%s[^<]*" % REFLECTED_VALUE_MARKER, "", page or "")
2485+
page = page or ""
2486+
if REFLECTED_VALUE_MARKER in page:
2487+
page = re.sub(r"(?si)[^\s>]*%s[^\s<]*" % REFLECTED_VALUE_MARKER, "", page)
24862488
return filter(None, (_.group('result').strip() for _ in re.finditer(TEXT_TAG_REGEX, page)))
24872489

24882490
def trimAlphaNum(value):

0 commit comments

Comments
 (0)