diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-19 17:56:33 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-19 17:56:33 +0000 |
commit | 45d6107aef5900a500b34cdb5fc5240d9cf9c16e (patch) | |
tree | 20521101af980a3be68e38c2732d1b8f28a9d15e /Lib/html | |
parent | be0058df3a90ee61d46877ed6a6a47081e98314a (diff) | |
download | cpython-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.py | 2 |
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) |