Comment 2 for bug 1851029

Revision history for this message
guyskk (guyskk) wrote :

It's OK to return empty div in the case.

When I remove the code tag in the input content, it return empty div, I think it's fine.
lxml only raise AssertError when both root tag and child tag in kill_tags set.

```
>>> from lxml.html.clean import Cleaner
>>> html_cleaner = Cleaner(kill_tags=['pre', 'code'])
>>> content = '<pre>xxx</pre>'
>>> print(html_cleaner.clean_html(content))
<div></div>
```