X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/6c5e73886e42526c4a4ae522e45ddae07d141df8..64f951d0b32c3c210b71ef941e23b8dd98f13658:/rss2maildir.py diff --git a/rss2maildir.py b/rss2maildir.py index 7acbe54..a0c40a1 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -227,7 +227,9 @@ class HTML2Text(HTMLParser): elif self.inpre: self.text = self.text + unicode(data, "utf-8") else: - self.text = self.text + unicode(data, "utf-8").strip() + u' ' + isallwhitespace = data.strip() == "" + if not isallwhitespace: + self.text = self.text + unicode(data, "utf-8").strip() + u' ' def handle_entityref(self, name): entity = name