Replace the special characters in the template to fix issues
templateContent = templateContent.replace("\n", "");
templateContent = templateContent.replace("\r", "");
templateContent = templateContent.replace("\t", "");
templateContent = templateContent.replace("\"", "\\\"");