Removing trailing blanks

This commit is contained in:
Miroslav Stampar 2012-12-14 12:00:45 +01:00
parent 2e97405ffa
commit c41618416c
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ def decodePage(page, contentEncoding, contentType):
# e.g. ’…™ # e.g. ’…™
if "&#" in page: if "&#" in page:
page = re.sub('&#(\d+);', lambda _: unichr(int(_.group(1))), page) page = re.sub('&#(\d+);', lambda _: unichr(int(_.group(1))), page)
# e.g. ζ # e.g. ζ
page = re.sub('&([^;]+);', lambda _: unichr(htmlEntities[_.group(1)]) if htmlEntities.get(_.group(1), 0) > 255 else _.group(0), page) page = re.sub('&([^;]+);', lambda _: unichr(htmlEntities[_.group(1)]) if htmlEntities.get(_.group(1), 0) > 255 else _.group(0), page)

View File

@ -83,7 +83,7 @@ def tamper(payload, **kwargs):
retVal += random.choice(blanks) retVal += random.choice(blanks)
continue continue
retVal += payload[i] retVal += payload[i]
return retVal return retVal