summaryrefslogtreecommitdiff
path: root/bin/report/render/html2html/html2html.py
diff options
context:
space:
mode:
authordsh (Open ERP) <dsh@tinyerp.com>2009-06-18 17:57:42 +0530
committerdsh (Open ERP) <dsh@tinyerp.com>2009-06-18 17:57:42 +0530
commit12434e7292d8c861581f3a8a206201afa32e21fa (patch)
treebd3c05b7ba95055c3a32f69c241776c4311f1f18 /bin/report/render/html2html/html2html.py
parent5e088111856f8c9e58227b1bc6939da53315f03f (diff)
[FIX] fix missing tail process and skip unnecessary whitespace characters
bzr revid: dsh@tinyerp.com-20090618122742-we73sy313qem28zu
Diffstat (limited to 'bin/report/render/html2html/html2html.py')
-rw-r--r--bin/report/render/html2html/html2html.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/report/render/html2html/html2html.py b/bin/report/render/html2html/html2html.py
index db6a1ea511c..fa07e9b4726 100644
--- a/bin/report/render/html2html/html2html.py
+++ b/bin/report/render/html2html/html2html.py
@@ -30,7 +30,7 @@ import re
from reportlab.lib.utils import ImageReader
_regex = re.compile('\[\[(.+?)\]\]')
-
+utils._regex = re.compile('\[\[\s*(.+?)\s*\]\]',re.DOTALL)
class html2html(object):
def __init__(self, html, localcontext):
self.localcontext = localcontext
@@ -48,6 +48,7 @@ class html2html(object):
if len(child):
for n in new_child:
new_child.text = utils._process_text(self, child.text)
+ new_child.tail = utils._process_text(self, child.tail)
new_child.remove(n)
process_text(child, new_child)
else:
@@ -66,6 +67,7 @@ class html2html(object):
else :
new_child.getparent().remove(new_child)
new_child.text = utils._process_text(self, child.text)
+ new_child.tail = utils._process_text(self, child.tail)
self._node = copy.deepcopy(self.etree)
for n in self._node:
self._node.remove(n)