html cleaner rewrite svg image tag to img tag
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I noticed that the html.cleaner rewrite image tag to img tag (see: https:/
Executing this python script reproduce the problem :
```
from lxml.html.clean import Cleaner
html_content = '''
<html>
<body>
<svg>
<image xlink:href=
</svg>
</body>
</html>
'''
cleaner = Cleaner(
html_clean = cleaner.
print(html_clean)
```
The output of this script is :
```
<div>
<body>
<svg>
<img xlink:href=
</svg>
</body>
</div>
```
The image tag was rewritten to img tag and the image is not displayed anymore in browsers.
There is the configuration I used to test this behavior :
Python : sys.version_
lxml.etree : (4, 9, 2, 0)
libxml used : (2, 9, 14)
libxml compiled : (2, 9, 14)
libxslt used : (1, 1, 35)
libxslt compiled : (1, 1, 35)
Is this a bug or this behavior is wanted ? If it's a bug let me know, I'll be happy to fix it.
Thanks !