wrong xml escaping in pdf reports

Bug #1130010 reported by Jacques-Etienne Baudoux
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

All reports are calling the method toxml to escape the strings to be formatted in xml.

from report.interface import toxml
'<account id="%d" name="%s">' % (aid, toxml(aname)))

The toxml method is properly escaping the characters according to xml specifications as it escapes < > &
However, if the xml code is created manually with a format string, you need to also escape the " character into &quot;

I suggest this correction in all pdf reports:

- from report.interface import toxml
+ import report.interface
+ toxml = lambda s: report.interface.toxml(s).replace('"','&quot;')

Related branches

Amit Parik (amit-parik)
affects: openobject-addons → openobject-server
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.