Nik Clayton wrote:
Tom Insam wrote:
On Mon, 2006-03-20 at 10:15 +0000, Simon Wistow wrote:
Couldn't it just use ';' isntead of & or & - no url (un?)escaping
needed whatsoever
That's a CGI.pm weirdness, and can't be relied upon. Plus, I'm sure
there will be other characters that need escaping in the url sometimes..
http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2
[SNIP]
We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors
the trouble of escaping "&" characters in this manner.
While it may be a recommended part of a standard, I wouldn't rely on the ';'
functionality as a default ever. In real life there is the standard, and then
there is 'actual use', and I think in this case the ';' usage is not
consistently supported. Of course I'd love it if it did work. We'd finally be
done with the ampersand dilemma once and for all.
From Tom:
Gosh, isn't that the conclusion we came to last time? (about
Template::Plugin::URL). Poking at my archives, abw decided that the
default separator should be '&', but that there should also be a
variable you can set, and that the default for TT3 should be '&' for
sanity. I believe that doing what the other URL-generating module does
is saner (even if it's wrong) than doing something different.
Yes, we have dealt with this before. However, I think the primary reason with using & was
so we didn't break anyone's current templates. Given that the plugin is new, using
"&" would probably be fine since nothing will be broken. (Although, I suppose it
could be argued that it would be confusing.)
If we wanted to be consistent with the URL plugin then Darren has an interesting idea
about subclassing the URL plugin for this task. However, it's probably best to do the
"right thing" from the start, though.
As a side note, I took a look at CPAN and it looks like 0.02 of the module uses
"&" format now. Perhaps just adding a JOINT (or JOIN or JOINER) global like in
the new URL plugin would be good. (And maybe a 'joiner' parameter when USEing the new plugin.)
-- Josh
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates