Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 11551
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: fumiya [...] samba.gr.jp
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.14
Fixed in: (no value)



Subject: Template::Plugin::URL uses '&' for joining parameters
I want to use Template::Plugin::URL for generating a URL in JavaScript statements and others (not HTML!). But Template::Plugin::URL generates a BAD URL when URL has query parameters. For example: [% USE url(’/cgi‐bin/baz.pl’, mode=’browse’, debug=1) %] [% url %] generates: /cgi‐bin/baz.pl?mode=browse&debug=1 This is good for HTML, but BAD for JavaScript and others. This problem is introduced in Template-Toolkit version 2.00-rc2 14th November 2000, described in 'Changes' file as: * Applied a patch from Leon Brocard which corrects the behaviour of the URL plugin to join parameters with '&' instead of '&'. For HTML, user can escape '&' in URL without this change as below: [% url | html %] Please revert this BAD change.
Date: Fri, 18 Feb 2005 18:06:33 +0900
From: SATOH Fumiyasu <fumiya [...] samba.gr.jp>
To: bug-Template-Toolkit [...] rt.cpan.org
Subject: Re: [cpan #11551] AutoReply: Template::Plugin::URL uses '&amp;' for joining parameters
RT-Send-Cc:
I'm sorry for my 'broken' message that has BAD character codes... To fix my mistake, I'll repost as below. I want to use Template::Plugin::URL for generating a URL in JavaScript statements and others (not HTML!). But Template::Plugin::URL generates a BAD URL when URL has query parameters. For example: [% USE url('/cgi-bin/baz.pl', mode='browse', debug=1) %] [% url %] generates: /cgi-bin/baz.pl?mode=browse&amp;debug=1 This is good for HTML, but BAD for JavaScript and others. This problem is introduced in Template-Toolkit version 2.00-rc2 14th November 2000, described in 'Changes' file as: * Applied a patch from Leon Brocard which corrects the behaviour of the URL plugin to join parameters with '&amp;' instead of '&'. For HTML, user can escape '&' in URL without this change as below: [% url | html %] Please revert this BAD change. -- -- Name: SATOH Fumiyasu -- Home: http://www.sfo.jp (in Japanese only) -- Mail: fumiya at net-thrust.com, samba.gr.jp, namazu.org or ...