The XML object is documented here: http://web2py.com/book/default/chapter/05#XML. Just pass the string to XML() directly. In the example you found, variations[x].content was specific to that particular example (i.e., variations[x].content represented the string to be displayed). Note, XML(..., sanitize=True) will do some sanitizing of the HTML (i.e., only allow particular tags and attributes in order to minimize the possibility of a security vulnerability). Anthony
On Thursday, July 14, 2011 2:13:47 PM UTC-4, steveL wrote: > In my web2py database I am storing strings with embedded html in. When > I try to render these records > in my views the html is not rendered (ie I get the string I put into > the database with all the embeded > html). On investigating this problem there was a similar problem some > 2/3 years ago and the solution > was given as use > > {{=XML (variations[x].content)}} > > where x is the string containing the embeded html. > > However when I use this solution I get > > NameError: name 'variations' is not defined > > Now the original solution is over 2 years old - has something > changed????? > > Thanks in advance > > Steve > > +++++ > >