commit | fd036451bf0e0ade8783e21df801abf7be96d020 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Tue Aug 19 17:56:33 2008 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Tue Aug 19 17:56:33 2008 +0000 |
tree | e70ff65a9e641d8e790bc091f0dc2507baf344ca | |
parent | 3ad7ba10a20827b24d4b1aa9dd49474db8affbdd [diff] [blame] |
#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.
diff --git a/Lib/html/parser.py b/Lib/html/parser.py index 828eece..83a5825 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py
@@ -385,4 +385,4 @@ return '&'+s+';' return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", - replaceEntities, s) + replaceEntities, s, re.ASCII)