[Templates] Problem with URL ecoded vars? Upgraded from Template-Toolkit v 2.11 to 2.19
Randal L. Schwartz
merlyn@stonehenge.com
Mon, 17 Sep 2007 09:20:18 -0700
>>>>> "Vivek" == Vivek Khera <khera@kcilink.com> writes:
Vivek> On Sep 15, 2007, at 5:11 PM, David Martin wrote:
Vivek> You don't want to URI encode your url's in your HTML. You want to HTML
Vivek> encode them. Change your |uri filter calls to |html filter calls.
Vivek> There was a correction in the uri filter recently (last or prior
Vivek> version of TT) to make it properly escape all URI escapables. Thus,
Vivek> you want to use the correct filter, "html".
Yes, the proper way to think about it is that filepaths need to be URI-encoded
to become a URL. So if you have a filepath, and want a URL, you "| uri". But
all text in an HTML delivery needs to be entitized, so you add "| html" to
make sure that ampersands are correct.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!