Thanks Massimo. That is what I attempted first but cgi.escape only handles &, <, and >. I was hoping for a single method that dealt with everything. No worries, it is easy enough to write one.
On Jul 5, 1:31 am, mdipierro <[email protected]> wrote: > {{import cgi}} > > the replace > {{=s.title}} > with > {{=cgi.escape(s.title,True)}} > > On Jul 4, 8:02 pm, "mr.freeze" <[email protected]> wrote: > > > I am trying to pass a web2py string var that contains quotes, > > apostrophes, slashes, etc. to an element's onmouseover method > > ( onmouseover="showTip(this,'{{=s.title}}','{{=s.notes}}');" ) but I > > need to html escape it first in order to nest it in the javascript > > quotes. What is the best method? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

