[FIX] note: small bugs
This commit is contained in:
parent
768b3592c2
commit
8fe9f07cac
|
@ -57,7 +57,7 @@ class pad_common(osv.osv_memory):
|
||||||
#get content of the real field
|
#get content of the real field
|
||||||
for record in model.browse(cr, uid, [context["object_id"]]):
|
for record in model.browse(cr, uid, [context["object_id"]]):
|
||||||
if record[real_field]:
|
if record[real_field]:
|
||||||
myPad.setText(path, html2plaintext(record[real_field]))
|
myPad.setText(path, (html2plaintext(record[real_field]).encode('utf-8')))
|
||||||
#Etherpad for html not functional
|
#Etherpad for html not functional
|
||||||
#myPad.setHTML(path, record[real_field])
|
#myPad.setHTML(path, record[real_field])
|
||||||
|
|
||||||
|
|
|
@ -213,6 +213,7 @@ def html2plaintext(html, body_id=None, encoding='utf-8'):
|
||||||
html = html.replace(' ' * 2, ' ')
|
html = html.replace(' ' * 2, ' ')
|
||||||
html = html.replace('>', '>')
|
html = html.replace('>', '>')
|
||||||
html = html.replace('<', '<')
|
html = html.replace('<', '<')
|
||||||
|
html = html.replace('&', '&')
|
||||||
|
|
||||||
# strip all lines
|
# strip all lines
|
||||||
html = '\n'.join([x.strip() for x in html.splitlines()])
|
html = '\n'.join([x.strip() for x in html.splitlines()])
|
||||||
|
|
Loading…
Reference in New Issue