From 58070343d25ca1aca32cd1bd10ada38a710e9447 Mon Sep 17 00:00:00 2001 From: "dsh (Open ERP)" Date: Wed, 10 Jun 2009 19:19:19 +0530 Subject: [FIX] fix &,<,> problem for html2html-url report bzr revid: dsh@tinyerp.com-20090610134919-x3hkueo10dlrqkn5 --- bin/report/render/html2html/html2html.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (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 1fc63572a0f..db6a1ea511c 100644 --- a/bin/report/render/html2html/html2html.py +++ b/bin/report/render/html2html/html2html.py @@ -74,11 +74,15 @@ class html2html(object): def url_modify(self,root): for n in root.getchildren(): - if n.text.find('=0 and n.text.find('style')<=0 : + if (n.text.find('=0 or n.text.find('<a')>=0) and n.text.find('href')>=0 and n.text.find('style')<=0 : node = (n.tag=='span' and n.getparent().tag=='u') and n.getparent().getparent() or ((n.tag=='span') and n.getparent()) or n style = node.get('color') and "style='color:%s; text-decoration: none;'"%node.get('color') or '' - href = n.text.split('=0: + t = '<a ' + else : + t = '