From 2f96458bcb6dfe8b8db4ef0101036b09bfa7c5f5 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 11 Oct 2022 13:22:13 +0530 Subject: [PATCH] fix: allow backtick in HTML templates as well --- esbuild/frappe-html.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esbuild/frappe-html.js b/esbuild/frappe-html.js index d38a0c23cb..1384f1bedd 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 = scrub_html_template(content); + content = JSON.stringify(scrub_html_template(content)); return { - contents: `\n\tfrappe.templates['${filename}'] = \`${content}\`;\n`, + contents: `\n\tfrappe.templates['${filename}'] = ${content};\n`, watchFiles: [filepath], }; })