cnelson
Aug 31st, 2005, 02:14 PM
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:
<input type="text" name="entries[Foo Bar (AA), N. A. [cr]]" value="" />
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.
I've found the offending line of code is in BeanWrapperImpl.java (line 610 in version 1.2.4):
int keyEnd = propertyName.indexOf(PROPERTY_KEY_SUFFIX, keyStart + PROPERTY_KEY_PREFIX.length());
This returns the first occurence of ']', not the last.
This seem like a bug to me... anyone have a different opinion on it?
Regards,
Christian
<input type="text" name="entries[Foo Bar (AA), N. A. [cr]]" value="" />
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.
I've found the offending line of code is in BeanWrapperImpl.java (line 610 in version 1.2.4):
int keyEnd = propertyName.indexOf(PROPERTY_KEY_SUFFIX, keyStart + PROPERTY_KEY_PREFIX.length());
This returns the first occurence of ']', not the last.
This seem like a bug to me... anyone have a different opinion on it?
Regards,
Christian