summaryrefslogtreecommitdiff
path: root/Lib/sgmllib.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1996-12-16 21:56:27 +0000
committerFred Drake <fdrake@acm.org>1996-12-16 21:56:27 +0000
commit09bcf8c0312864c5a65a877453e62315059e8182 (patch)
tree35cb1be53d06231200a55f689647b571cdb64534 /Lib/sgmllib.py
parentb6454e58bc43131be39bcb06fead5464a8f06e3b (diff)
downloadcpython-git-09bcf8c0312864c5a65a877453e62315059e8182.tar.gz
(sgmllib.py): Partial acceptance of patch from David Leonard
<leonard@dstc.edu.au>; allows hyphen and period in the middle of attribute names. Still not allowed as first character; as first character these are illegal in the Reference Concrete Syntax, and we've not identified any use of these characters as the first char in an attribute name in deployment on the web.
Diffstat (limited to 'Lib/sgmllib.py')
-rw-r--r--Lib/sgmllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py
index 304bbdbff0..8f32001880 100644
--- a/Lib/sgmllib.py
+++ b/Lib/sgmllib.py
@@ -33,7 +33,7 @@ commentopen = regex.compile('<!--')
commentclose = regex.compile('--[ \t\n]*>')
tagfind = regex.compile('[a-zA-Z][a-zA-Z0-9]*')
attrfind = regex.compile(
- '[ \t\n]+\([a-zA-Z_][a-zA-Z_0-9]*\)'
+ '[ \t\n]+\([a-zA-Z_][-.a-zA-Z_0-9]*\)'
'\([ \t\n]*=[ \t\n]*'
'\(\'[^\']*\'\|"[^"]*"\|[-a-zA-Z0-9./:+*%?!()_#=~]*\)\)?')