{{import cgi}}

the replace
{{=s.title}}
with
{{=cgi.escape(s.title,True)}}

On Jul 4, 8:02 pm, "mr.freeze" <nat...@freezable.com> 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 web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to