Preceding and trailing spaces are ignored with text input

@knolleary

Agree, an option 'tick' box would be great