[issue12629] HTMLParser silently stops parsing with malformed attributes

2011-07-24 Thread Kevin Stock

New submission from Kevin Stock :

Given the input '', HTMLParser only detects the opening x 
tag, and then stops parsing. Ideally this should behave like the case '' which raises an error and then can continue parsing the close x 
tag.

--
components: Library (Lib)
files: test.py
messages: 141051
nosy: teoryn
priority: normal
severity: normal
status: open
title: HTMLParser silently stops parsing with malformed attributes
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file22745/test.py

___
Python tracker 
<http://bugs.python.org/issue12629>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12629] HTMLParser silently stops parsing with malformed attributes

2011-07-26 Thread Kevin Stock

Kevin Stock  added the comment:

A workaround is to call close() after feed(), which I supposed I should have 
done anyways. However, this does not resolve the issue that the two cases 
behave so differently. 

The code that causes the difference is lines 351-355 of parser.py, which also 
has a misleading comment stating it detects the / in a /> ending (which is 
actually done at 334).

--

___
Python tracker 
<http://bugs.python.org/issue12629>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com