-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi!
Nice library.
I have only one small problem. When i try print tag which contain attribute with None value, print fail.
Here is simple code to reproduce that:
import AdvancedHTMLParser
parser = AdvancedHTMLParser.AdvancedHTMLParser()
parser.parseStr('<div itemscope itemtype="http://schema.org/Order">')
parser.getHTML()
Returnung:
Traceback (most recent call last):
File "/home/jiri/userconfig/mail/error.py", line 5, in <module>
parser.getHTML()
File "/tmp/p/venv/lib/python3.11/site-packages/AdvancedHTMLParser/Parser.py", line 887, in getHTML
return doctypeStr + rootNode.outerHTML
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
Observed on python 3.11.5 (Arch linux) with up-to-date package from pip.
Metadata
Metadata
Assignees
Labels
No labels