HTMLPullParser doesn't return events if feed terminates within an attribute value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
New
|
Undecided
|
Unassigned |
Bug Description
Consider the following script
from lxml import etree
def print_elements(
print(
def this_works():
parser = etree.HTMLPullP
parser.
print_
def this_also_works():
parser = etree.HTMLPullP
parser.
parser.
print_
def this_fails():
parser = etree.HTMLPullP
parser.
parser.
print_
this_works()
this_also_works()
this_fails()
Output:
[<Element span at 0x103cf15c0>]
[<Element span at 0x103cf1c00>]
[]
The last one does not return any event or element as feed 1 ended within quoted attribute value.
Python : sys.version_
lxml.etree : (4, 9, 1, 0)
libxml used : (2, 9, 14)
libxml compiled : (2, 9, 14)
libxslt used : (1, 1, 34)
libxslt compiled : (1, 1, 34)