remove whitespaces from template