Re: [htmltmpl] escaping quotes [was: (no subject)]

2002-07-07 Thread Sam Tregar
On Mon, 8 Jul 2002, Philip S Tellis wrote: > how about this: > > new HTML::Template(..., escape={ > name => 'quote', > find => qr/(['"])/, > replace => '\$1' > }) I think I'd prefer: escape => { quote => sub { $$_[0] =~ s/(['"])/\$1/g; } } Or possibly setting $_:

Re: [htmltmpl] escaping quotes [was: (no subject)]

2002-07-07 Thread Philip S Tellis
On Sun, 7 Jul 2002, Sam Tregar wrote: > > Sam, I think this needs an escape=quote parameter. What do you think. > > Would only be a couple of lines added. > > Mmm, maybe. Or a way to add new escapes at runtime. how about this: new HTML::Template(..., escape={ name => 'quote',

Re: [htmltmpl] escaping quotes [was: (no subject)]

2002-07-07 Thread Sam Tregar
On Mon, 8 Jul 2002, Philip S Tellis wrote: > Sam, I think this needs an escape=quote parameter. What do you think. > Would only be a couple of lines added. Mmm, maybe. Or a way to add new escapes at runtime. -sam --- This sf.net email is

Re: [htmltmpl] escaping quotes [was: (no subject)]

2002-07-07 Thread Philip S Tellis
On Sun, 7 Jul 2002, Sam Tregar wrote: > > > > Try . " doesn't translate to " inside a javascsript string. Sam, I think this needs an escape=quote parameter. What do you think. Would only be a couple of lines added. Philip --- This sf.

Re: [htmltmpl] escaping quotes [was: (no subject)]

2002-07-07 Thread Philip S Tellis
On Sun, 7 Jul 2002, Douglas Kirkland wrote: > You need to filter the data looking for the character in the data stream. > This is what I use to take care of that problem. > > $data =~ s|"|\\"|g; This won't work if you use the same var in javascript and in html.

Re: [htmltmpl] (no subject)

2002-07-07 Thread Sam Tregar
On Fri, 28 Jun 2002, Glenn Morgan wrote: > I am using HTML::Template with PageKit and having a problem with > substitutions in javascript quoted strings. See below: > > ;"> > > If tmpl_str="It's a wonderful life" > > Then my resultant html is > > Try . -sam ---

Re: [htmltmpl] (no subject)

2002-07-07 Thread Douglas Kirkland
On Thursday 27 June 2002 09:59 pm, Glenn Morgan wrote: > Hi > > Had a search through the archive but can't find what I'm looking for, so > here goes. > > I am using HTML::Template with PageKit and having a problem with > substitutions in javascript quoted strings. See below: > > ;"> > > If tmpl_s

Re: [htmltmpl] using html::template for mail merge? pointers anyone?

2002-07-07 Thread Andrew Johnson
Zachary Buckholz wrote: > Does anyone have any pointers on the best way to utilize HTML::Template > and a mail merge module? > > I finished my initial project http://www.securitysaint.com using > HTML::Template and CGI::Application but I want to build onto it by > sending weekly status emails