Hi,

'&' is unwanted character in xml so you should use CDATA

 for example:

 *<para><![CDATA[&]]></para>*

2009/8/21 Pete <[email protected]>

>
> 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
> >
>


-- 
Anıl KARADAĞ
Cihan Bilişim A.Ş. - Yazılım Geliştirme Uzmanı
GYTE- Bilgisayar Müh. Yüksek Lisans öğrencisi
http://anilkaradag.info/blog

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to