I am using the sample report from
*https://code.google.com/p/pyfpdf/wiki/Web2Py#Sample_Report.*
It works as expected until I have an apostrophe or ampersand in the string.
ORIGINAL
# create several rows:
rows = []
for i in range(1000):
col = i % 2 and "#F0F0F0" or "#FFFFFF"
rows.append(TR(TD("Rows %s" %i),
TD("Something", _align="center"),
TD("%s" % i, _align="right"),
_bgcolor=col))
Yields a table similar to this:
Row 1 Something 1
Row 2 Something 2
Row 3 Something 3
...
When I add an apostrophe(') to the string, the columns break at the
apostrophe
CHANGED
# create several rows:
rows = []
for i in range(1000):
col = i % 2 and "#F0F0F0" or "#FFFFFF"
rows.append(TR(TD*("Row's %*s" %i),
TD("Something", _align="center"),
TD("%s" % i, _align="right"),
_bgcolor=col))
Yields a table similar to this:
Row s 1 Something
Row s 2 Something
Row s 3 Something
...
I looked for a setting to disable the 'magic quotes' but found nothing. The
same behavior results if I insert an ampersand(&). The text that I am
creating contains many words like it's, who's, something's, someone's, and
so on.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.