Apply trimming to getInputText() capture