summaryrefslogtreecommitdiff
path: root/bin/report/render/html2html/html2html.py
diff options
context:
space:
mode:
authorChristophe Simonis <christophe@tinyerp.com>2009-06-12 13:02:21 +0200
committerChristophe Simonis <christophe@tinyerp.com>2009-06-12 13:02:21 +0200
commit6dbb10e531b249b9b68ecbf38653c06602a968e7 (patch)
tree7a53e83645859e4a05ed7a0b0b23f5e928c139c2 /bin/report/render/html2html/html2html.py
parent60cf794c7d98c4180a8a748a6cdd4cda754cb13d (diff)
parent725a31135eed3ef3f3bac5843f852b13b1c5ea9a (diff)
[MERGE]
bzr revid: christophe@tinyerp.com-20090612110221-6e40fork6um5f20h
Diffstat (limited to 'bin/report/render/html2html/html2html.py')
-rw-r--r--bin/report/render/html2html/html2html.py10
1 files changed, 7 insertions, 3 deletions
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('<a ')>=0 and n.text.find('style')<=0 :
+ if (n.text.find('<a ')>=0 or n.text.find('&lt;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('<a ')[-1]
- n.text = ' '.join(['<a ',style,href])
+ if n.text.find('&lt;a')>=0:
+ t = '&lt;a '
+ else :
+ t = '<a '
+ href = n.text.split(t)[-1]
+ n.text = ' '.join([t,style,href])
self.url_modify(n)
return root