Update 'server/lib/tools.js'

fix return;
This commit is contained in:
dark 2020-09-17 10:29:33 +00:00
parent 0e580cac12
commit 62c4066c76

View file

@ -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) => {