We recently experienced a bug where someone was able to enter a trailing
space into a TextField in spite of Wicket's automatic trimming of
whitespace. Upon further investigation it appears the user had entered a
non-breaking space, which is not removed by the String.trim() method
that Wicket uses. It's easy to do this accidentally, e.g. by
cutting-and-pasting from a web page.
This is not so easy for us to correct, as FormComponent.trim(String) is
final. We've resorted to overriding FormComponent.getInputAsArray() and
trimming each string individually.
Should Wicket use a more robust trim method? Or should
FormComponent.trim(String) at least be made non-final so we adjust it to
our needs in a less clunky way?
jk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org