[FIX] If RML contains unicode characters and title in the same <para>,it would have failed.
lp bug: https://launchpad.net/bugs/507429 fixed bzr revid: jvo@tinyerp.com-20100118093815-jkq0e0u09kx4x7hn
This commit is contained in:
parent
b3dd6bad34
commit
28f42a58ec
|
@ -112,6 +112,8 @@ def _process_text(self, txt):
|
|||
try:
|
||||
expr = sps.pop(0)
|
||||
txt = eval(expr,self.localcontext)
|
||||
if txt and (isinstance(txt, unicode) or isinstance(txt, str)):
|
||||
txt = self.localcontext.get('translate', lambda x:x)(txt)
|
||||
except Exception,e:
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,
|
||||
|
@ -119,7 +121,8 @@ def _process_text(self, txt):
|
|||
expr.encode('utf-8')))
|
||||
if type(txt)==type('') or type(txt)==type(u''):
|
||||
txt2 = str2xml(txt)
|
||||
result += tools.ustr(txt2)
|
||||
result1 = tools.ustr(txt2)
|
||||
result = result + str(result1) # To avoid concatenation of unicode and str
|
||||
elif (txt is not None) and (txt is not False):
|
||||
result += str(txt)
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue