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 have the following TT chunk, using the CGI plugin, in a form:
<tr><td>Title</td>
<td>[% CGI.textfield({name => "title", value => book_ref.title}) %]</td>
</tr>
, the point being that this field will be populated with the value of
book_ref.title. I just came across a case where this value had a quotation
mark in it, and the field was blank from that point on. Thus, if the
value of book_ref.title is:
The "Good" War
, what actually appears in the form field is:
The
I assumed that I was supposed to be escaping this, and that
this was a regular behavior of CGI.pm which I had just never
noticed before, but a test case disconfirmed that; immediately
before calling the template in my program, I inserted this:
print header(), start_form(), textfield(-value => $book_ref->{title}),
end_form(), end_html();
die;
and the field that was displayed did, in fact, show
The "Good" War
Can someone explain to me why TT is behaving differently, and what I
need to do to correct this?
Thank you.
Jesse Sheidlower
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates