[Templates] The uri filter and fragments
Bill Moseley
moseley@hank.org
Fri, 6 Oct 2006 10:48:00 -0700
The TT docs for the uri filter suggests:
<a href="[% filename | uri | html %]">click here</a>
Which I have done for a while out of habit, but doesn't work well for
fragments:
$ perl -MTemplate -le 'Template->new->process( \"[% u | uri | html %]", { u => "my file&stuff.html#offset" } )'
my%20file&stuff.html%23offset
Frankly, I'm not sure what's should happen, but the browsers I tested
with choked on it.
I'm now using Catalyst, so I use its c.uri_for(), but one usage of
that filter still ended up in a macro and broke some links.
--
Bill Moseley
moseley@hank.org