Script token adding an extra space
- November 15, 2017
- 1 reply
- 7611 views
Tokens thats are velocity scripts are giving me a hard time. Some are adding extra spaces after the token is added to the content of the email. The extra spaces only show up after the email is sent and are not reflected in any previews. Does anyone know how to ensure if I add a script token, the spacing before or after the token appear normal in the sent email?
#set($frid = ${DonationList.get(0).fundraiserID})
#set($raised = ${DonationList.get(0).donationSumNew})
#set($currency = ${DonationList.get(0).currencyChoice})
#foreach($fr in $DonationList)
#if($fr.fundraiserID > $frid)
#set($raised = $fr.donationSumNew)
#set($currency = $fr.currencyChoice)
#set($frid = $fr.fundraiserID)
#end
#end
#if ($currency == 'EUR')
#set($finalLTR = '€'+ $number.format($raised))
$finalLTR
#elseif ($currency == 'GBP')
#set($finalLTR = '£' + $number.format($raised))
$finalLTR
#else
#set($finalLTR = '$' + $number.format($raised))
$finalLTR
#end