diff --git a/server/lib/tools.js b/server/lib/tools.js index d0bae870..4379f136 100644 --- a/server/lib/tools.js +++ b/server/lib/tools.js @@ -170,11 +170,11 @@ function _formatTemplateSimple(source, mergeTags, isHTML) { return ''; } - const containsHTML = /<[a-z][\s\S]*>/.test(value); - return isHTML ? (containsHTML ? value : value.replace(/(?:\r\n|\r|\n)/g, '
'), { - useNamedReferences: true, - allowUnsafeSymbols: true - }) : (containsHTML ? htmlToText.fromString(value) : value); + // const containsHTML = /<[a-z][\s\S]*>/.test(value); + // return isHTML ? (containsHTML ? value : value.replace(/(?:\r\n|\r|\n)/g, '
'), { + // useNamedReferences: true, + // allowUnsafeSymbols: true + // }) : (containsHTML ? htmlToText.fromString(value) : value); }; return source.replace(/\[([a-z0-9_.]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {