From 12434e7292d8c861581f3a8a206201afa32e21fa Mon Sep 17 00:00:00 2001 From: "dsh (Open ERP)" Date: Thu, 18 Jun 2009 17:57:42 +0530 Subject: [FIX] fix missing tail process and skip unnecessary whitespace characters bzr revid: dsh@tinyerp.com-20090618122742-we73sy313qem28zu --- bin/report/render/html2html/html2html.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/report/render/html2html/html2html.py') 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) -- cgit v1.2.3