That works.  Thanks!

On Thursday, May 30, 2013 11:12:30 PM UTC-4, Anthony wrote:
>
> Maybe try:
>
>     db.announcement.body.represent = lambda v, r: XML(v, sanitize=True)
>
> The sanitize=True will remove potentially unsafe HTML/Javascript from the 
> content.
>
> Anthony
>
> On Thursday, May 30, 2013 10:04:29 PM UTC-4, John Fraser wrote:
>>
>> When storing html in a table, how would one render that html to the 
>> SQLFORM.grid view page? .  The page the user sees when clicking on the view 
>> button in the grid?   I am storing HTML in the body field of the 
>> db.announcenment.  By default it SQLFORM.grid displays tags in the view 
>> <br>,<h1>, etc...
>>
>> See my controller below:
>>
>> def manage_announcement():
>>     db.announcement.id.readable=False
>>     grid = SQLFORM.grid(db.announcement,csv=False)
>>     return dict(grid=grid)
>>
>>
>>

-- 

--- 
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/groups/opt_out.


Reply via email to