This commit is contained in:
Miroslav Stampar 2015-07-23 00:41:03 +02:00
parent 75ed5f767c
commit 358651b19c

View File

@ -2482,7 +2482,9 @@ def extractTextTagContent(page):
[u'Title', u'foobar']
"""
page = re.sub(r"(?si)[^\s>]*%s[^<]*" % REFLECTED_VALUE_MARKER, "", page or "")
page = page or ""
if REFLECTED_VALUE_MARKER in page:
page = re.sub(r"(?si)[^\s>]*%s[^\s<]*" % REFLECTED_VALUE_MARKER, "", page)
return filter(None, (_.group('result').strip() for _ in re.finditer(TEXT_TAG_REGEX, page)))
def trimAlphaNum(value):