← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 562181] Re: Reports crash when text contains & sign!

 

I changed the status to "opinion", to indicate that we will not look at
this bug now.  (there is no appropriate status).

The bug is *clearly* at extra-
addons/label/report/report_partner_labels.py, in the fact that it
constructs an xml chunk by simply doing "<foo>%s</foo>" % content in
python. That's wrong, because all of content must be properly xml-
escaped.

It is not a framework bug. It is that module only and its bad code.
Since it is extra-addons, it is pushed to the bottom of our todo stack.


** Changed in: openobject-server
       Status: In Progress => Opinion

-- 
Reports crash when text contains & sign!
https://bugs.launchpad.net/bugs/562181
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: Opinion

Bug description:
When you have a partner with a &-sign in the name, e.g. "C & A" the label print action will crash as follows :

Environment Information : 
System : Windows-XP-5.1.2600-SP3
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : fr_CH.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 682, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/interface.py", line 92, in create
    rml = self.create_rml(cr, xml, uid, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/interface.py", line 172, in create_rml
    transform(etree.fromstring(xml)))
  File "lxml.etree.pyx", line 2440, in lxml.etree.fromstring (src/lxml/lxml.etree.c:23985)
  File "parser.pxi", line 1510, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:63925)
  File "parser.pxi", line 1389, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:62857)
  File "parser.pxi", line 931, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:60016)
  File "parser.pxi", line 542, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:56659)
  File "parser.pxi", line 628, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:57504)
  File "parser.pxi", line 568, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:56902)
XMLSyntaxError: xmlParseEntityRef: no name, line 21, column 35