By default, the template engine escapes everything -- to avoid that, do: links = XML("<li><a href='app_path/view/user_a'>user_a</a></li>")
See http://web2py.com/books/default/chapter/29/5#XML. Anthony On Monday, June 4, 2012 10:52:07 AM UTC-4, Sushant Taneja wrote: > > Hi All, > > I have a string var containing some HTML code > > links = "<li><a href='app_path/view/user_a'>user_a</a></li>" > I am passing this variable to response.render function as: > > context_dict = dict(links=links) > message = response.render("invite_friend.html",context_dict) > > # Send mail code below > > In invite_friend.html I have the code: > > <html> > Hello there, > <ul> > {{=links}} > <ul> > </html> > > When the mail is sent, the email message is rendered as below: > > Hello there, > <li><a href='app_path/view/user_a'>user_a</a></li> > > instead of > > Hello there, > > - user_a <http://#> > > > How to render the above mail properly ?? I am working on GAE and > mail.settings.server is set to 'gae' > >