Re: [htmltmpl] escaping quotes [was: (no subject)]
Brought to you by:
samtregar
From: Philip S T. <phi...@gm...> - 2002-06-28 05:56:04
|
On Fri, 28 Jun 2002, Glenn Morgan wrote: > I am using HTML::Template with PageKit and having a problem with > <tmpl_var> substitutions in javascript quoted strings. See below: > > <button onclick="javascript: js_str='<tmpl_var > name="tmpl_str">;"></button> > > If tmpl_str="It's a wonderful life" > > Then my resultant html is > > <button onclick="javascript: js_str='It's a wonderful life'";></button> Interesting. Looks like an escape=quotemeta may be in order here. This seems like something others might encounter at some point, so maybe it should be added to HTML::Template. Philip |