I'm binding several values to a map, and from time to time, the map key will contain square brackets. This results in some html that looks like this:
When this is submitted and bound, the key becomes "Foo Bar (AA), N. A. [cr" instead of "Foo Bar (AA), N. A. [cr]", which throws off the whole binding process.
<input type="text" name="entries[Foo Bar (AA), N. A. [cr]]" value="" />
I've found the offending line of code is in BeanWrapperImpl.java (line 610 in version 1.2.4):
This returns the first occurence of ']', not the last.
int keyEnd = propertyName.indexOf(PROPERTY_KEY_SUFFIX, keyStart + PROPERTY_KEY_PREFIX.length());
This seem like a bug to me... anyone have a different opinion on it?