[FIX]: rml2pdf: backported from trunk revison:3781, _process_text escaping char...
authorskh <skh@tinyerp.com>
Tue, 6 Dec 2011 06:43:42 +0000 (12:13 +0530)
committerskh <skh@tinyerp.com>
Tue, 6 Dec 2011 06:43:42 +0000 (12:13 +0530)
bzr revid: skh@tinyerp.com-20111206064342-3hutgbiw0v0phuv0

bin/report/render/rml2pdf/trml2pdf.py
bin/report/render/rml2pdf/utils.py

index f58f3fd..820e6ee 100644 (file)
@@ -610,11 +610,11 @@ class _rml_flowable(object):
             for key in txt_n.attrib.keys():
                 if key in ('rml_except', 'rml_loop', 'rml_tag'):
                     del txt_n.attrib[key]
-            if True or not self._textual(n).isspace():
-                if not n.tag == 'bullet':
-                    txt_n.text = utils.xml2str(self._textual(n))
-                txt_n.tail = n.tail and utils._process_text(self, n.tail.replace('\n','')) or ''
-                rc1 += etree.tostring(txt_n)
+
+            if not n.tag == 'bullet':
+                txt_n.text = utils.xml2str(self._textual(n))
+            txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
+            rc1 += etree.tostring(txt_n)
         return rc1
 
     def _table(self, node):
index e631fcd..6676c85 100644 (file)
@@ -130,10 +130,10 @@ def _process_text(self, txt):
                 except Exception:
                     pass
                 if isinstance(txt, basestring):
-                    result += str2xml(txt)
+                    result += txt
                 elif txt and (txt is not None) and (txt is not False):
                     result += ustr(txt)
-        return result
+        return str2xml(result)
 
 def text_get(node):
     return ''.join([ustr(n.text) for n in node])