Update 'server/lib/tools.js'
This commit is contained in:
parent
87dc416f48
commit
0e580cac12
1 changed files with 5 additions and 5 deletions
|
@ -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, '<br/>'), {
|
||||
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, '<br/>'), {
|
||||
// useNamedReferences: true,
|
||||
// allowUnsafeSymbols: true
|
||||
// }) : (containsHTML ? htmlToText.fromString(value) : value);
|
||||
};
|
||||
|
||||
return source.replace(/\[([a-z0-9_.]+)(?:\/([^\]]+))?\]/ig, (match, identifier, fallback) => {
|
||||
|
|
Loading…
Reference in a new issue