Skip to content
Snippets Groups Projects
Commit 2cee7455 authored by Martin Groppe's avatar Martin Groppe
Browse files

[Projekt: xRM-Marketing][TicketNr.: 1079868][Redesign: Opener Link Ersetzung...

[Projekt: xRM-Marketing][TicketNr.: 1079868][Redesign: Opener Link Ersetzung muss auf Grund Mosaico Einschränkungen überarbeitet werden]
parent 5af4130a
No related branches found
No related tags found
No related merge requests found
......@@ -133,10 +133,24 @@ BulkMailUtils.sendBulkMail = function (pBulkMailId, pIsTestRun)
{
if (Utils.toBoolean(isRedirect))
{
var linkFn = function (pContactId)
var linkFn;
//Mosaico places a url in front of the placeholder if it gets placed inside image src
//so we temporarily create the whole html tag with a placeholder for the opener until this is solved
if (placeholder == "pixel")
{
return baseUrl + "link=" + weblinkId + "&log=" + mailLogIds.get(pContactId);
linkFn = function (pContactId)
{
return "<img src=\""+baseUrl + "link=" + weblinkId + "&log=" + mailLogIds.get(pContactId)+"\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" hspace=\"0\" vspace=\"0\" align=\"top\">";
}
}
else
{
linkFn = function (pContactId)
{
return baseUrl + "link=" + weblinkId + "&log=" + mailLogIds.get(pContactId);
}
}
return new Placeholder(placeholder, Placeholder.types.CALLBACKFUNCTION, linkFn);
}
return new Placeholder(placeholder, Placeholder.types.FIXEDVALUE, url);
......
......@@ -425,7 +425,13 @@ DocumentTemplate.prototype.getReplacedContent = function (pReplacements)
case DocumentTemplate.types.HTML:
// replaces ä, ö, ü, ... with html escape signs
for (let i in pReplacements)
pReplacements[i] = text.text2html(pReplacements[i], false);
{
//we need to write a full html tag and not only text for the opener pixel at the moment
if(i != "{@pixel@}")
{
pReplacements[i] = text.text2html(pReplacements[i], false);
}
}
case DocumentTemplate.types.TXT:
let decodedContent = util.decodeBase64String(content);
let encodedContent = this._replaceText(decodedContent, pReplacements);
......
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