[merge] 5.0-lxml-fixes into trunk

bzr revid: xmo@tinyerp.com-20091202092042-36gz0wkbu27aetvc
bzr revid: xmo@tinyerp.com-20091202093008-9uwo63c0bwdh8eaw
This commit is contained in:
Xavier Morel
2009-12-02 10:30:08 +01:00
18 changed files with 218 additions and 331 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class html2html(object):
return self._node
def url_modify(self,root):
for n in root.getchildren():
for n in root:
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 ''