Strip newlines to make sure that all input is uniform.