From f6fc6d2c9dd2cd72995ee61a5d5fff508cbb3511 Mon Sep 17 00:00:00 2001 From: re-is-good <46746379+liquancss@users.noreply.github.com> Date: Wed, 18 Nov 2020 04:24:19 +0800 Subject: [PATCH] Update pyquery.py --- pyquery/pyquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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