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.
[...]
rows.append(TR(TD("Row's %s" %i),TD("Something", _align="center"),TD("%s" % i, _align="right"),_bgcolor=col))
Thanks Professor, I'll contact them soon. Good luck on the promotion. I know how difficult a hurdle that is. You merit the post for many reasons; passion, dedication, technical insight and responsiveness.
--
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 a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/tOVmx3QJ5fo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>>> P("Row's").xml()
'<p>Row's</p>'
>>> from gluon.sanitizer import sanitize
>>> sanitize('<p>Row's</p>')
'<p>Row&#x27;s</p>'
>>> sanitize('<p>Row's</p>', escape=False)
'<p>Row&#x27;s</p>'I haven't had time to dig into this myself, but the solution needs to also handle the following case:
{{mytext=" a is < than b & c is > b"}}
<tr><td> {{=mytext}}</td><td>This goes in column 2 </td></tr>
The '&', '<', and '>' should not start a new column.
Richard Warg
Sure, I'll try to do it.
--