On Wed, Nov 19, 2003 at 11:22:06AM -0500, darren chamberlain wrote:
> * Jesse Sheidlower <jester at panix.com> [2003/11/18 23:47]:
> > I hit on something that seems really weird, which must mean that
> > I'm missing something totally obvious about the use of CGI.pm,
> > but I'd be grateful for a pointer anyway.
> 
> I'm not able to reproduce your problem:
> 
>   $ tpage
>   [% USE CGI; book_ref.title = 'The "Good" War' %]
>     <tr><td>Title</td>
>     <td>[% CGI.textfield({name => "title", value => book_ref.title}) %]</td>
>     </tr>
> 
> The output is properly quoted:
> 
>     <tr><td>Title</td>
>     <td><input type="text" name="title" value="The &quot;Good&quot; War" /></td>
>     </tr>
> 
> I tested with CGI 2.98 and 3.00, under TT 2.10a.  Is there something
> else going on, maybe?  There is no reason that I know of that the CGI
> plugin should behave differently under TT, since the CGI plugin simply
> defers to CGI.pm:

Yes, that's what I thought, too, regardless of version.

In any case, I was running slightly older, but not really old, versions;
I have now updated them, and gotten the same results. And curiously, it
works (and worked, even before the upgrade) fine with me, too, using tpage:

---
monopoly~ $ cat goodwar
 [% USE CGI; book_ref.title = 'The "Good" War' %]
   <tr><td>Title</td>
   <td>[% CGI.textfield({name => "title", value => book_ref.title}) %]</td>
   </tr>

monopoly~ $ tpage goodwar
 
   <tr><td>Title</td>
   <td><input type="text" name="title" value="The &quot;Good&quot; War" /></td>
   </tr>
---

Yet continues not to work "in the field": The following TT code:

  <tr><td class="label">Title</td> [% book_ref.title = 'The "Good" War' %]
  <td>[% CGI.textfield({name => "title", size => 60, value => book_ref.title}) %]</td>
  </tr>

generates the following HTML when processed in a CGI script with $tt->process, etc.:

  <tr><td class="label">Title</td> 
  <td><input type="text" name="title" value="The "Good War size="60" /></td>
  </tr>

I don't see that I'm doing anything that would affect the output in this way.

Any thoughts?

Thanks for looking this over.

Best,

Jesse Sheidlower

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to