#12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten.

This commit is contained in:
Ezio Melotti 2011-09-05 17:11:06 +03:00
parent 73abc24345
commit d9e0b068af
4 changed files with 7 additions and 2 deletions

View file

@ -458,4 +458,4 @@ class HTMLParser(_markupbase.ParserBase):
return '&'+s+';'
return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));",
replaceEntities, s, re.ASCII)
replaceEntities, s, flags=re.ASCII)