From dce98fb972bf6ad67935d28a09eb2e69c3b6e5c6 Mon Sep 17 00:00:00 2001 From: arpandhakal Date: Mon, 8 Sep 2025 13:02:58 +0545 Subject: [PATCH] fix(OUT-2315): applied preprocessTemplate util which removes the {{ and }} from template for rendering handlebars --- src/app/components/EditorInterface.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/components/EditorInterface.tsx b/src/app/components/EditorInterface.tsx index 44cfdec..8350a0d 100644 --- a/src/app/components/EditorInterface.tsx +++ b/src/app/components/EditorInterface.tsx @@ -62,6 +62,7 @@ import { Delete } from '@mui/icons-material' import { Box } from '@mui/material' import Image from 'next/image' import { defaultState } from '../../../defaultState' +import { preprocessTemplate } from '@/utils/string' interface IEditorInterface { settings: ISettings | null @@ -185,7 +186,15 @@ const EditorInterface = ({ useEffect(() => { if (appState?.appState.readOnly) { const template = Handlebars?.compile( - appState?.appState.originalTemplate || '', + preprocessTemplate( + prepareCustomLabel( + appState?.appState?.originalTemplate ?? '', + appState?.appState?.customLabels, + { + isClientMode: true, + }, + ), + ), ) const c = template(appData) setTimeout(() => {