Cleaner.clean_html is buggy on simple HTML

Bug #2011329 reported by X
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
New
Undecided
Unassigned

Bug Description

Python : sys.version_info(major=3, minor=9, micro=12, releaselevel='final', serial=0)
lxml.etree : (4, 9, 2, 0)
libxml used : (2, 9, 14)
libxml compiled : (2, 9, 4)
libxslt used : (1, 1, 35)
libxslt compiled : (1, 1, 35)

The following code triggers the bug:

from lxml.html.clean import Cleaner
c = Cleaner()

c.clean_html("<li></li>")

The behavior is the following:

>>> import lxml
>>> lxml.__version__
'4.9.2'
>>> from lxml.html.clean import Cleaner
>>> c = Cleaner()
>>>
>>> c.clean_html("<li></li>")
'<li>'

X (zfhdk)
summary: - Cleaner buggy on empty <li> tag
+ Cleaner.clean_html is buggy on empty <li> tag
summary: - Cleaner.clean_html is buggy on empty <li> tag
+ Cleaner.clean_html is buggy on simple HTML
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.