We create a delivery that contains two data fields concatenated by a hyphen:
...and when you click on link to the landing page, ("Your Offer"), it brings you to a landing page whose URL address contains the concatenated data fields, "80699361-A07071.htm" but the problem is that the hyphen (" -") that combines the two data fields creates an extra spacing in the URL address: "0699361%20-%20A07071.htm" thereby throwing a 401 page not found error since it is the incorrect URL address.
How do we eliminate the extra spacing surrounding the hyphen so that the extra spacing is removed from the URL address in the dynamic content field that generates the two data fields?:
logInfo("field1: #" + vars.field1 + "#");
logInfo("field2: #" + vars.field2 + "#");
then check the logs.
(of course replace vars.field1/2 by your own data element).
var str = " Hello World "; logInfo("string without extra spaces : #" + str.trim() + "#");