summaryrefslogtreecommitdiffstats
path: root/Lib/html
diff options
context:
space:
mode:
authorEzio Melotti <none@none>2011-04-07 19:03:31 (GMT)
committerEzio Melotti <none@none>2011-04-07 19:03:31 (GMT)
commit2e3607c1e758865519b28066b8925f37203e2197 (patch)
treeec09ce29a9dcc1bfa91e7e0f65428666332eda41 /Lib/html
parent9b5ac3efa64d72b54d4f1ab32a95c260b39ab98d (diff)
downloadcpython-2e3607c1e758865519b28066b8925f37203e2197.zip
cpython-2e3607c1e758865519b28066b8925f37203e2197.tar.gz
cpython-2e3607c1e758865519b28066b8925f37203e2197.tar.bz2
#7311: fix html.parser to accept non-ASCII attribute values.
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 21ebbc3..a3586eb 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -28,7 +28,7 @@ tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9:_]*')
# make it correctly strict without breaking backward compatibility.
attrfind = re.compile(
r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*'
- r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]*))?')
+ r'(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?')
attrfind_tolerant = re.compile(
r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*'
r'(\'[^\']*\'|"[^"]*"|[^>\s]*))?')