remove newlines in template