After thinking more about it, I think it is best to encode the values.
If someone really needs to have these special characters unencoded in a
URL, they can always build the URL themselves instead of relying on the
Stripes tags or Resolutions to do it for them.
It should also be noted that if you use these characters as literals in
your @UrlBinding, they do not get encoded when the URL is built. So
building a link for @UrlBinding("/foo/{a},{b},{c}") would yield, for
example, /foo/1,2,3.
Thanks for the input, everybody.
-Ben
Oscar Westra van Holthe - Kind wrote:
On 16-05-2008 at 11:39, Ben Gunter wrote:
We have an open issue requesting that clean URL parameters be URL-encoded.
http://stripesframework.org/jira/browse/STS-559
This sounds like a good idea at first, but when URLEncoder encodes a
string, it appears to encode *anything* that is not alphanumeric. So if,
for example, you want a param that looks like "a,b,c" you're going to end
up with "a%2Cb%2Cc". If you've ever looked at a Yahoo link you know they
use all kinds of URLs with commas, semicolons and such in them. So we're
not sure which way to go. What do you all think?
Pretty URL's are not as important as working URL's. And as unencoded URL's
may not parse correctly, that option may lead to all kinds of weird bugs
and/or workarounds.
And if aestetics are as much an issue for you as they are for me, use clean
URL's only with "clean" strings. That is, any number or valid Java identifier
(without $) -- a URL is not an input box. As an added advantage, this option
works regardless of what will be decided.
Oscar
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users