Thanks! Works like a charm! Richard
On Nov 7, 9:39 am, Anthony <abasta...@gmail.com> wrote: > The HTML is probably being escaped in the view when it is displayed. Try > putting the content inside XML() when you display it. If you want the > content to display properly in a SQLTABLE, you should be able to use XML() > in the field's "represent" attribute: > > db.define_table('your_table', > Field('html_content', represent=lambda v, r: XML(v))) > > Note, if this is user-entered HTML, you probably want to use XML(..., > sanitize=True) to protect against XSS > attacks. Seehttp://web2py.com/book/default/chapter/05#XML. > > Anthony > > > > > > > > On Monday, November 7, 2011 8:04:58 AM UTC-5, horridohobbyist wrote: > > > Is there a way to insert HTML into a database text field so that when > > the text is displayed (say, in a SQLTABLE), the browser renders the > > HTML? For example, I insert: > > > <a href="http://psychovisual.com">Psychovisual.com</a> > > > into a database text field, but it's not rendered. > > > Thanks, > > Richard