trim whitespace
fix make customInput before inserting DOM