Skip to content
Snippets Groups Projects
Commit 30e8ec41 authored by Martin Groppe's avatar Martin Groppe Committed by Sebastian Listl
Browse files

[Projekt: xRM-Marketing][TicketNr.: 1079839][Fehler: Inkonsistentes Verhalten...

[Projekt: xRM-Marketing][TicketNr.: 1079839][Fehler: Inkonsistentes Verhalten bei Platzhalterersetzung]
parent 19f0b462
No related branches found
No related tags found
No related merge requests found
...@@ -65,10 +65,23 @@ DocumentTemplate.prototype.toString = function (pWithSubtemplates) ...@@ -65,10 +65,23 @@ DocumentTemplate.prototype.toString = function (pWithSubtemplates)
if (this._stringCache[stringCachePosition] == null) if (this._stringCache[stringCachePosition] == null)
{ {
var content = pWithSubtemplates && this._subtemplateResolvedContent || this.content; var content = pWithSubtemplates && this._subtemplateResolvedContent || this.content;
if (this.type == DocumentTemplate.types.PLAIN) switch(this.type)
this._stringCache[stringCachePosition] = content; {
else case DocumentTemplate.types.EML: //intended fallthrough
this._stringCache[stringCachePosition] = text.parseDocument(content); if(this.options.onlyBody)
{
var email = Email.fromRFC(content);
content = util.encodeBase64String(email.body);
}
case DocumentTemplate.types.HTML:
this._stringCache[stringCachePosition] = util.decodeBase64String(content);
break;
case DocumentTemplate.types.PLAIN:
this._stringCache[stringCachePosition] = content;
break;
default:
this._stringCache[stringCachePosition] = text.parseDocument(content);
}
} }
return this._stringCache[stringCachePosition]; return this._stringCache[stringCachePosition];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment