olaf@pc:~/test/python2.4-2.4.3/Lib$ diff /usr/lib/python2.4/sgmllib.py /usr/lib/python2.4/sgmllib_SAVE.py 32c32,37 < endbracket = re.compile('[<>]') --- > starttag = re.compile(r'<[a-zA-Z][-_.:a-zA-Z0-9]*\s*(' > r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*' > r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]' > r'[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*(?=[\s>/<])))?' > r')*\s*/?\s*(?=[<>])') > endtag = re.compile(r'])') 36c41 < r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*))?') --- > r'(\'[^\']*\'|"[^"]*"|[][\-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~\'"@]*))?') 248,249c253 < # XXX The following should skip matching quotes (' or ") < match = endbracket.search(rawdata, i+1) --- > match = starttag.match(rawdata, i) 252c256 < j = match.start(0) --- > j = match.end(0) 286c290 < match = endbracket.search(rawdata, i+1) --- > match = endtag.match(rawdata, i) 289c293 < j = match.start(0) --- > j = match.end(0)