Hi Jael,
Please write something like this in the Javascript activity of your workflow, or in the Script activity of your delivery in your workflow:
logInfo("field1: #" + vars.field1 + "#");
logInfo("field2: #" + vars.field2 + "#");
then check the logs.
(of course replace vars.field1/2 by your own data element).
You should notice if you get extra space before the end # sign, so it would mean in your data source.
Otherwise, it means that it is the html code that you put in your delivery content that is responsible for your extra space. Please provide the part of hmtl + Javascript code you wrote in the delivery body for that personalisation.
In any cases, you can rid off the extra spaces using standard Javascript function trim():
var str = " Hello World ";
logInfo("string without extra spaces : #" + str.trim() + "#");
Regards
JS