Update 'server/lib/tools.js'
fix return;
This commit is contained in:
parent
0e580cac12
commit
62c4066c76
1 changed files with 3 additions and 0 deletions
|
@ -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
|
if (value === undefined) { // in RSS it may happen that the key is present, but the value is undefined
|
||||||
return '';
|
return '';
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const containsHTML = /<[a-z][\s\S]*>/.test(value);
|
// const containsHTML = /<[a-z][\s\S]*>/.test(value);
|
||||||
|
@ -175,6 +177,7 @@ function _formatTemplateSimple(source, mergeTags, isHTML) {
|
||||||
// useNamedReferences: true,
|
// useNamedReferences: true,
|
||||||
// allowUnsafeSymbols: true
|
// allowUnsafeSymbols: true
|
||||||
// }) : (containsHTML ? htmlToText.fromString(value) : value);
|
// }) : (containsHTML ? htmlToText.fromString(value) : value);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return source.replace(/\[([a-z0-9_.]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {
|
return source.replace(/\[([a-z0-9_.]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue