diff Lib/html/parser.py @ 72270:9896fc2a8167 3.2

#12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten.
author Ezio Melotti <ezio.melotti@gmail.com>
date Mon, 05 Sep 2011 17:11:06 +0300
parents a80b8adc575d
children 41d41776aa6d
line wrap: on
line diff
--- a/Lib/html/parser.py	Mon Sep 05 00:14:09 2011 +0200
+++ b/Lib/html/parser.py	Mon Sep 05 17:11:06 2011 +0300
@@ -458,4 +458,4 @@
                     return '&'+s+';'
 
         return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));",
-                      replaceEntities, s, re.ASCII)
+                      replaceEntities, s, flags=re.ASCII)