diff --git a/newspaper/parsers.py b/newspaper/parsers.py index f81c7177..c40e09d6 100644 --- a/newspaper/parsers.py +++ b/newspaper/parsers.py @@ -85,7 +85,7 @@ def nodeToString(cls, node): """`decode` is needed at the end because `etree.tostring` returns a python bytestring """ - return lxml.etree.tostring(node).decode() + return lxml.etree.tostring(node, method='html').decode() @classmethod def replaceTag(cls, node, tag):