diff --git a/esbuild/frappe-html.js b/esbuild/frappe-html.js
index 1384f1bedd..d38a0c23cb 100644
--- a/esbuild/frappe-html.js
+++ b/esbuild/frappe-html.js
@@ -18,9 +18,9 @@ module.exports = {
return fs
.readFile(filepath, "utf-8")
.then((content) => {
- content = JSON.stringify(scrub_html_template(content));
+ content = scrub_html_template(content);
return {
- contents: `\n\tfrappe.templates['${filename}'] = ${content};\n`,
+ contents: `\n\tfrappe.templates['${filename}'] = \`${content}\`;\n`,
watchFiles: [filepath],
};
})