diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py index f5071bc..ee91738 100644 --- a/pyquery/pyquery.py +++ b/pyquery/pyquery.py @@ -1064,7 +1064,7 @@ def html(self, value=no_default, **kwargs): tag = self[0] children = tag.getchildren() if not children: - return tag.text + return tag.text or '' html = tag.text or '' if 'encoding' not in kwargs: kwargs['encoding'] = str