html.SelectElement stripping whitespace from <option> values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
Unassigned |
Bug Description
Hello,
The fix for #399249 (https:/
A sample test case:
=======
from lxml import etree, html
doc = etree.fromstrin
<html><
<option value="01 " selected=
<option value="02 ">Second</option>
</select>
print('"%s"' % doc.xpath(
=======
The versions doesn't really matter, as it is present in all versions since 2.2.3:
Python : sys.version_
lxml.etree : (3, 5, 0, 0)
libxml used : (2, 9, 3)
libxml compiled : (2, 9, 2)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
Thanks,
Ashish
Changed in lxml: | |
milestone: | none → 3.8.0 |
importance: | Undecided → Low |
status: | New → Fix Committed |
Changed in lxml: | |
status: | Fix Committed → Fix Released |
I've added a PR on Github which should fix this issue:
https:/ /github. com/lxml/ lxml/pull/ 228