Commit 09bcf8c0 authored by Fred Drake's avatar Fred Drake

(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.
parent b6454e58
...@@ -33,7 +33,7 @@ commentopen = regex.compile('<!--') ...@@ -33,7 +33,7 @@ commentopen = regex.compile('<!--')
commentclose = regex.compile('--[ \t\n]*>') commentclose = regex.compile('--[ \t\n]*>')
tagfind = regex.compile('[a-zA-Z][a-zA-Z0-9]*') tagfind = regex.compile('[a-zA-Z][a-zA-Z0-9]*')
attrfind = regex.compile( 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]*' '\([ \t\n]*=[ \t\n]*'
'\(\'[^\']*\'\|"[^"]*"\|[-a-zA-Z0-9./:+*%?!()_#=~]*\)\)?') '\(\'[^\']*\'\|"[^"]*"\|[-a-zA-Z0-9./:+*%?!()_#=~]*\)\)?')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment