[reportlab-users] Bug in Paragraph class with tags when switching frames
Dinu Gherman
gherman at darwin.in-berlin.de
Wed Nov 21 05:35:01 EST 2007
Robin Becker:
> well the splitting was the thing that caused the problem before; I
> have added an example to test_platypus_breaking that has a very
> long link text. The paragraph gets split in the middle of the link,
> but the result doesn't suffer this problem. I also added some
> syntax checking to force non-blank hrefs.
I found the bug related to this in my code. Apparently, assigning styles
in OpenOffice docs (and I guess this is true for other editors as well)
to parts of a paragraph can lead to leading or trailing blanks being in-
cluded in the styled text (like a URL), e.g.
spam www.foo.com eggs
becomes "tokenized" like this (simplifying a lot):
"spam ", "www.foo.com ", "eggs"
which my code transformed mindlessly into:
"spam ", "<a href='www.foo.com'>www.foo.com</a>", "<a href=' '> </
a>", "eggs"
so there was an undefined link destination.
I think it might be useful and possible to have better hints in
exception
messages as to what is actually happening and which link destination is
failing.
Thanks and regards,
Dinu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071121/a2487fa2/attachment.html>
More information about the reportlab-users
mailing list