diff --git a/.liquibase/_____SYSTEMALIAS/basic/init/data/defaultBlob/mailServerIMAP.xml b/.liquibase/_____SYSTEMALIAS/basic/init/data/defaultBlob/mailServerIMAP.xml index bdab62bfe255b1403ed7330e7c1d86eb30421a65..783efb1f106e3917e36a2424e80e45a18a8b5da9 100644 --- a/.liquibase/_____SYSTEMALIAS/basic/init/data/defaultBlob/mailServerIMAP.xml +++ b/.liquibase/_____SYSTEMALIAS/basic/init/data/defaultBlob/mailServerIMAP.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> -<aliasConfig xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/aliasConfig/1.1.1"> +<aliasConfig xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/aliasConfig/1.1.2"> <name>mailServerIMAP_default</name> <serverId>default</serverId> <definitionName>mailServerIMAP</definitionName> <aliasConfigSub> - <aliasSubMailserverImap /> + <aliasSubMailserverImap> + <host>localhost</host> + <smtpHost>localhost</smtpHost> + </aliasSubMailserverImap> </aliasConfigSub> </aliasConfig> diff --git a/process/DocumentTemplate_lib/process.js b/process/DocumentTemplate_lib/process.js index 8bd0c7649089fbf7aaed572e237cff57907f8412..a3d6b55605cddb8f2e0c2d103d0a427e0f5d1ab2 100644 --- a/process/DocumentTemplate_lib/process.js +++ b/process/DocumentTemplate_lib/process.js @@ -67,7 +67,7 @@ DocumentTemplate.prototype.toString = function () DocumentTemplate.prototype._resolveEmbeddedTemplate = function () { - if (this.type == DocumentTemplate.types.PLAIN || this.type == DocumentTemplate.types.TXT || this.type == DocumentTemplate.types.HTML) + if (this.content != null && (this.type == DocumentTemplate.types.PLAIN || this.type == DocumentTemplate.types.TXT || this.type == DocumentTemplate.types.HTML)) { var replacedContent = ""; if (this.type == DocumentTemplate.types.PLAIN) @@ -111,7 +111,7 @@ DocumentTemplate.prototype._resolveEmbeddedTemplate = function () // Note: some embedded templates in embedded templates may be replaced, but this is NOT SUPPORTED, as it only works if the second template is not already replaced at that time. placeholders.forEach(function(pPlaceholder) { - replacedContent = replacedContent.replace("{@" + pPlaceholder[0] + "@}", pPlaceholder[1]) + replacedContent = replacedContent.replace("{@" + pPlaceholder[0] + "@}", pPlaceholder[1], "g") }, this); this.content = util.encodeBase64String(replacedContent);