[reportlab-users] Special characters in paragraphs

Dick Kniep dick at kniep.nl
Thu Dec 15 08:02:09 EST 2005

Hi Christoph,

Thanks for the answer, Now I've got another one.

In my code I write text from a database (so this is free text) to the 
paragraph. Off course an ampersand can be replaced, but I can get all kinds 
of texts from the database. So to prevent any more crashes, I will have to 
escape all characters that are "prohibited" like <, >, &. So I have three 

1. Which characters have to be escaped
2. How do I escape them (ie. & becomes &amp)
3. Where do I find this in the manuals?

Keep up the good work, I like the product a lot!!!


Dick Kniep

Op woensdag 14 december 2005 10:49, schreef Christoph Zwerschke:
> Dick Kniep wrote:
> > xml parser error (; missing in entityref) in paragraph beginning
> > 'Den Besten&Sloof'
> > Note the '&' in the text which causes the crash.
> This should really go to the FAQ. As the error indicates, Platypus
> paragraphs are parsed as XML since they can contain XML tags (see user
> guide). So you have to escape any special XML characters like & and <>.
> In this case, you have to write &amp; instead of &.
> -- Christoph
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users

More information about the reportlab-users mailing list