trim text when creating card