]> git.sommitrealweird.co.uk Git - rss2maildir.git/blobdiff - rss2maildir.py
* add missing source files for unit tests
[rss2maildir.git] / rss2maildir.py
index 7acbe54966ae02ff2cfaaf7cd3d67bb49cb0eb09..a0c40a1513e064b56166bab45e2cc294db3164e1 100755 (executable)
@@ -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