html.Clean removed meta data event when set meta=False on Cleaner

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

Bug Description

I have a docs that looks like this
``
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://dev.xxx.com/ns/rest"><head><meta http-equiv="Content-Type" content="text/html; charset=ASCII" /><title> - XXX</title><style>```

As you see there is meta data in the doc.
I se the html cleaner such that meta is False and expects the meta section will be untouched.
```cleaner = Cleaner(scripts=True, page_structure=False, meta=False, javascript=True, links=False, forms=False, processing_instructions=False, safe_attrs_only=False)
   cleanHtml = cleaner.clean_html(html)
```
But, the following is the result of cleanHtml,

```<html xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://dev.splunk.com/ns/rest"><head><title> - XXX</title><style>
```

Also, is there. way to retain the ```!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">``` portion?

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.