summaryrefslogtreecommitdiff
path: root/Lib/html
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-08-19 17:56:33 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2008-08-19 17:56:33 +0000
commit45d6107aef5900a500b34cdb5fc5240d9cf9c16e (patch)
tree20521101af980a3be68e38c2732d1b8f28a9d15e /Lib/html
parentbe0058df3a90ee61d46877ed6a6a47081e98314a (diff)
downloadcpython-45d6107aef5900a500b34cdb5fc5240d9cf9c16e.tar.gz
#2834: Change re module semantics, so that str and bytes mixing is forbidden,
and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead.
Diffstat (limited to 'Lib/html')
-rw-r--r--Lib/html/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 828eece4ef..83a58258c7 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -385,4 +385,4 @@ class HTMLParser(_markupbase.ParserBase):
return '&'+s+';'
return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));",
- replaceEntities, s)
+ replaceEntities, s, re.ASCII)