logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Quotation marks garbling CGI.textfield values: msg#00058

Subject: Re: Quotation marks garbling CGI.textfield values
Hmmm ... maybe you are using an older verion of
one the modules? (i hope the HTML "shows up" in
this email ... apologies if it doesn't)

$ tpage quote.cgi
<input type="text" name="title"
value="&quot;Hello&quot;" />

$ cat quote.cgi
[%
USE CGI;
title ='"Hello"';
CGI.textfield({name => "title", value => title})
%]

$ perl -MTemplate -le'print $Template::VERSION'
2.10

$ perl -MTemplate::Plugin::CGI -le'print
$Template::Plugin::CGI::VERSION'
2.59

jeffa

--- Jesse Sheidlower <jester-VmQCmMdMyN0AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Nov 19, 2003 at 04:41:25AM -0500, Jesse
> Sheidlower wrote:
> > On Wed, Nov 19, 2003 at 08:16:31AM +0100, A.
> Pagaltzis wrote:
> > > * Jesse Sheidlower <jester-VmQCmMdMyN0AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
> [2003-11-19 05:50]:
> > > >   The "Good" War
> > > > 
> > > > , what actually appears in the form field
> is:
> > > > 
> > > >   The
> > > 
> > > And what did the generated HTML at that
> point look like?
> > 
> > <td><input type="text" name="title"
> value="The "Good War /></td>
> > 
> > (note, without the second quotation mark
> after "Good", let alone
> > one after the end of the title.)
> 
> I should add that the HTML generated by the
> equivalent code in
> CGI.pm, i.e. not through TT, was the
> appropriate
> 
>   ... value="The &quot;Good&quot; War" />
> 
> I didn't do anything special to escape this, so
> I don't know why I
> would need to do things differently with the TT
> plugin as opposed
> to CGI directly; in any case, I'd love to know
> what I do need to
> do differently.
> 
> Thanks.
> 
> Jesse Sheidlower
> 
> _______________________________________________
> templates mailing list
> templates-MnLy+PD7ppGDO3lXZvfOKmD2FQJk+8+b@xxxxxxxxxxxxxxxx
>
http://lists.template-toolkit.org/mailman/listinfo/templates


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


<Prev in Thread] Current Thread [Next in Thread>