diff options
author | Fred Drake <fdrake@acm.org> | 1999-01-25 21:57:07 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-01-25 21:57:07 (GMT) |
commit | dfd8954e36b997c2f6adfa34df77bab92db6381d (patch) | |
tree | ac4abc5c7f0f61392a9c5dc679e5e32bae1bf318 /Lib/sgmllib.py | |
parent | 3dbba6ec3a065a573216bc79b5e4d655ee0cd899 (diff) | |
download | cpython-dfd8954e36b997c2f6adfa34df77bab92db6381d.zip cpython-dfd8954e36b997c2f6adfa34df77bab92db6381d.tar.gz cpython-dfd8954e36b997c2f6adfa34df77bab92db6381d.tar.bz2 |
Allow recognition of attributes even if they don't have space in front
of them. I.e., '<a name="foo"href="bar.html">' will now have two
attributes recognized.
Based on comments from newgroup.
Diffstat (limited to 'Lib/sgmllib.py')
-rw-r--r-- | Lib/sgmllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index ffb2ccc..8d50a88 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -35,7 +35,7 @@ commentopen = re.compile('<!--') commentclose = re.compile('--[%s]*>' % string.whitespace) tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9]*') attrfind = re.compile( - '[%s]+([a-zA-Z_][-.a-zA-Z_0-9]*)' % string.whitespace + '[%s]*([a-zA-Z_][-.a-zA-Z_0-9]*)' % string.whitespace + ('([%s]*=[%s]*' % (string.whitespace, string.whitespace)) + r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:+*%?!\(\)_#=~]*))?') |