Editing of campaigns seems to work
This commit is contained in:
parent
b1c667d13d
commit
7b46c4b4b0
27 changed files with 335 additions and 130 deletions
|
@ -11,7 +11,12 @@ function base(text, trustedBaseUrl, sandboxBaseUrl) {
|
|||
sandboxBaseUrl = sandboxBaseUrl.substring(0, sandboxBaseUrl.length - 1);
|
||||
}
|
||||
|
||||
return text.split('[URL_BASE]').join(trustedBaseUrl).split('[SANDBOX_URL_BASE]').join(sandboxBaseUrl);
|
||||
text = text.split('[URL_BASE]').join(trustedBaseUrl);
|
||||
text = text.split('[SANDBOX_URL_BASE]').join(sandboxBaseUrl);
|
||||
text = text.split('[ENCODED_URL_BASE]').join(encodeURIComponent(trustedBaseUrl));
|
||||
text = text.split('[ENCODED_SANDBOX_URL_BASE]').join(encodeURIComponent(sandboxBaseUrl));
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
function unbase(text, trustedBaseUrl, sandboxBaseUrl, treatSandboxAsTrusted = false) {
|
||||
|
@ -23,7 +28,12 @@ function unbase(text, trustedBaseUrl, sandboxBaseUrl, treatSandboxAsTrusted = fa
|
|||
sandboxBaseUrl = sandboxBaseUrl.substring(0, sandboxBaseUrl.length - 1);
|
||||
}
|
||||
|
||||
return text.split(trustedBaseUrl).join('[URL_BASE]').split(sandboxBaseUrl).join(treatSandboxAsTrusted ? '[URL_BASE]' : '[SANDBOX_URL_BASE]');
|
||||
text = text.split(trustedBaseUrl).join('[URL_BASE]');
|
||||
text = text.split(sandboxBaseUrl).join(treatSandboxAsTrusted ? '[URL_BASE]' : '[SANDBOX_URL_BASE]');
|
||||
text = text.split(encodeURIComponent(trustedBaseUrl)).join('[ENCODED_URL_BASE]');
|
||||
text = text.split(encodeURIComponent(sandboxBaseUrl)).join(treatSandboxAsTrusted ? '[ENCODED_URL_BASE]' : '[ENCODED_SANDBOX_URL_BASE]');
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue