There is a ticket out there for this - http://bitbucket.org/chris1610/satchmo/issue/813/xml-is-not-escaped-in-pdf-report-templates
To be honest, I haven't looked into this in detail. It's probably not too difficult to fix - just need to spend some time on it. -Chris On Fri, Aug 21, 2009 at 9:52 AM, Pete <[email protected]> wrote: > > We have a store with a product that contains an ampersand (&) in it's > name, which trml2pdf appears to be choking on when trying to print > invoices. From what I've read trml2pdf is not very unicode friendly. > Is there a work-around (other than renaming the product)? > > Here is the error: > > Traceback (most recent call last): > > File "/home/mysite/webapps/production/lib/python2.5/django/core/ > handlers/base.py", line 86, in get_response > response = callback(request, *callback_args, **callback_kwargs) > > File "/home/mysite/webapps/production/lib/python2.5/django/contrib/ > admin/views/decorators.py", line 33, in _checklogin > return view_func(request, *args, **kwargs) > > File "/home/mysite/webapps/production/lib/python2.5/django/views/ > decorators/cache.py", line 44, in _wrapped_view_func > response = view_func(request, *args, **kwargs) > > File "/home/mysite/lib/python2.5/satchmo/shipping/views.py", line 41, > in displayDoc > pdf = trml2pdf.parseString(smart_str(t.render(c))) > > File "/home/mysite/lib/python2.5/trml2pdf/trml2pdf.py", line 531, in > parseString > r = _rml_doc(data) > > File "/home/mysite/lib/python2.5/trml2pdf/trml2pdf.py", line 138, in > __init__ > self.dom = xml.dom.minidom.parseString(data) > > File "/usr/local/lib/python2.5/site-packages/_xmlplus/dom/ > minidom.py", line 1925, in parseString > return expatbuilder.parseString(string) > > File "/usr/local/lib/python2.5/site-packages/_xmlplus/dom/ > expatbuilder.py", line 942, in parseString > return builder.parseString(string) > > File "/usr/local/lib/python2.5/site-packages/_xmlplus/dom/ > expatbuilder.py", line 223, in parseString > parser.Parse(string, True) > > ExpatError: not well-formed (invalid token): line 143, column 48 > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
