lavr / python-emails

Modern python library for emails
http://python-emails.readthedocs.org
Other
405 stars 54 forks source link

Add html5 parser method, based on html5lib #76

Closed lavr closed 7 years ago

lavr commented 7 years ago

We had troubles with html5 letters, .i.e.:

>>> Transformer(html="<a><table/></a>", method="html").to_string()
'<html><body><a/><table/></body></html>'

To solve this problem we added method "html5", based on html5lib:

>>> Transformer(html="<a><table/></a>", method="html5").to_string()
'<html><head/><body><a><table/></a></body></html>'
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 92.361% when pulling 0365d2ed80e0859a4c1aa7f8d878ab5fe01b6181 on html5lib into 9a7d35ab0ec8e206b8400f5778e5794176254be4 on master.