Encode space to avoid rejecting users with spaces in username