mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX]report_py3o: Escape correctly html characters.
This commit is contained in:
committed by
Elmeri Niemelä
parent
f0e3256812
commit
a89aa2a2f9
@@ -7,6 +7,7 @@ from base64 import b64decode
|
||||
from cStringIO import StringIO
|
||||
import logging
|
||||
import os
|
||||
import cgi
|
||||
from contextlib import closing
|
||||
import subprocess
|
||||
|
||||
@@ -64,8 +65,7 @@ def py3o_report_extender(report_xml_id=None):
|
||||
|
||||
def format_multiline_value(value):
|
||||
if value:
|
||||
return Markup(value.replace('<', '<').replace('>', '>').
|
||||
replace('\n', '<text:line-break/>').
|
||||
return Markup(cgi.escape(value).replace('\n', '<text:line-break/>').
|
||||
replace('\t', '<text:s/><text:s/><text:s/><text:s/>'))
|
||||
return ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user