diff --git a/server/lib/tools.js b/server/lib/tools.js index 4379f136..89d40c30 100644 --- a/server/lib/tools.js +++ b/server/lib/tools.js @@ -168,6 +168,8 @@ function _formatTemplateSimple(source, mergeTags, isHTML) { if (value === undefined) { // in RSS it may happen that the key is present, but the value is undefined return ''; + } else { + return value; } // const containsHTML = /<[a-z][\s\S]*>/.test(value); @@ -175,6 +177,7 @@ function _formatTemplateSimple(source, mergeTags, isHTML) { // useNamedReferences: true, // allowUnsafeSymbols: true // }) : (containsHTML ? htmlToText.fromString(value) : value); + }; return source.replace(/\[([a-z0-9_.]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {