Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

String length validation and windows line breaks

$
0
0
Hey all,

Recenty, probably after moving to Wicket 6.16, we see some strange behavior
for TextAreas.

We have been using a JavaScript library to limit the number of characters a
user can enter in a textbox for years. Now we started getting validation
exceptions on the server that the user entered a too many characters. It
turned out that Wicket counts Windows '\r\n' as two characters, while JS
counts them as one.

We can easily fix that with a custom StringConverter that replaces Windows
linebreaks, but I was wondering if there were some recent changes in Wicket
that could have triggered these issues?

Cheers,

Thomas

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images