From 1198aaee3c091f20f26354961a334423ae095aa3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 Nov 2011 18:58:55 +0530 Subject: [PATCH] ... --- src/odf/load.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/odf/load.py b/src/odf/load.py index 722a3797d1..04915fdf84 100644 --- a/src/odf/load.py +++ b/src/odf/load.py @@ -101,15 +101,15 @@ class LoadParser(handler.ContentHandler): self.level = self.level - 1 # Changed by Kovid to deal with tags with only whitespace # content. - data = ''.join(self.data) + data = q = ''.join(self.data) tn = getattr(self.curr, 'tagName', '') try: do_strip = not tn.startswith('text:') except: do_strip = True if do_strip: - data = data.strip() - if data: + q = q.strip() + if q: self.curr.addText(data, check_grammar=False) self.data = [] self.curr = self.curr.parentNode