struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: "/" character an invalid key?
Date Thu, 07 Jul 2011 15:09:54 GMT
On Jul 7, 2011 9:38 AM, "Eric Lentz" <> wrote:
> That seems fragile for my use case

Your use case is intrinsically fragile. What happens when the field name has
a single or double quote? If it doesn't matter, then you're /already/ down
the slippery slope of special-casing.

I'd file this as an interceptor improvement. Since it uses a simple regex,
it doesn't have the semantic context necessary to know the suspicious
character is inside a string literal. This is a relatively unusual use case
for a parameter name, though.

That said, you can construct a regex that would allow arbitrary characters
inside quotes, and future-proof the interceptor.

IMO coupling field labels to semantic constructs is a Bad Idea: there are
reasons for decoupling things at the presentation layer. Hopefully you'll
never need to sell paint to people that speak Spanish.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message