@@ -377,6 +377,30 @@ def test_tolerant_parsing(self):
377377 ('endtag' , 'html' )],
378378 collector = self .collector )
379379
380+ def test_with_unquoted_attributes (self ):
381+ html = ("<html><body bgcolor=d0ca90 text='181008'>"
382+ "<table cellspacing=0 cellpadding=1 width=100% ><tr>"
383+ "<td align=left><font size=-1>"
384+ "- <a href=/rabota/><span class=en> software-and-i</span></a>"
385+ "- <a href='/1/'><span class=en> library</span></a></table>" )
386+ expected = [
387+ ('starttag' , 'html' , []),
388+ ('starttag' , 'body' , [('bgcolor' , 'd0ca90' ), ('text' , '181008' )]),
389+ ('starttag' , 'table' ,
390+ [('cellspacing' , '0' ), ('cellpadding' , '1' ), ('width' , '100%' )]),
391+ ('starttag' , 'tr' , []),
392+ ('starttag' , 'td' , [('align' , 'left' )]),
393+ ('starttag' , 'font' , [('size' , '-1' )]),
394+ ('data' , '- ' ), ('starttag' , 'a' , [('href' , '/rabota/' )]),
395+ ('starttag' , 'span' , [('class' , 'en' )]), ('data' , ' software-and-i' ),
396+ ('endtag' , 'span' ), ('endtag' , 'a' ),
397+ ('data' , '- ' ), ('starttag' , 'a' , [('href' , '/1/' )]),
398+ ('starttag' , 'span' , [('class' , 'en' )]), ('data' , ' library' ),
399+ ('endtag' , 'span' ), ('endtag' , 'a' ), ('endtag' , 'table' )
400+ ]
401+
402+ self ._run_check (html , expected , collector = self .collector )
403+
380404 def test_comma_between_attributes (self ):
381405 self ._run_check ('<form action="/xxx.php?a=1&b=2&", '
382406 'method="post">' , [
0 commit comments