I'm running into a bit of a problem generating URLs where I need to
encode text comtaining, for example, ampersands...

e.g.

Say I want to construct a link, of the form

  <a href="artist?name=[% name %]>[% name %]</a>

As the name could contain all sorts of characters, I would generally
write this as:

  <a href="artist?name=[% name | uri %]>[% name | html %]</a>

But, say the name was "Ike & Tina Turner".

Then, my url would be:

  "artist?name=Ike%20&%20Tina%20Turner"

Which, when submitted will end up just assinging "Ike " to name.

Filtering through [% name | uri | html %] doesn't help as it'll just
convert the '&' into '&amp;' which will have exactly the same problem.

Is there an easy way to deal with this? 

Thanks,

Tony


Reply via email to