comply to the TodoMVC spec and trim the input