[reportlab-users] Paragraph text with &

Juha Ruotsalainen kontza at gmail.com
Fri Feb 2 07:42:23 EST 2007


Hi there,

I'm creating a paragraph this way:
para = XPreformatted( contentText, style ),

where the contentText contains "Jim, Joe & Jill"

Now Paragraph's _setup-method dies on that ampersand. To be precise,
_parser.parse(text,style) is the quitter. It complains about that
ampersand being at the beginning of a line. I inserted some debug
print into the parse method of Paraparser, and I found out that it
splits my text into components, and one of those components is a line
containing, at the beginning of the line, only that ampersand.

How should go around this problem. One, obvious, is to replace & with
the word 'and'. But I don't want to :-)

Slaínte,
--
jussi


More information about the reportlab-users mailing list