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