Escaping forward slashes in template strings and removing leading spaces.