URL getting truncated in Velocity | Community
Skip to main content
Jo_Pitts1
Community Manager
May 19, 2022
Solved

URL getting truncated in Velocity

  • May 19, 2022
  • 1 reply
  • 1253 views

All,

I've got a weird issue in Velocity, where a URL is getting truncated.

I have this code

 

#set( $currentSeminarList = $lead.myClient_competition_data_s1 ) #if( ! $display.alt($currentSeminarList,"").isEmpty() ) #set( $currentSeminarCodes = $currentSeminarList.split("[|]") ) #foreach( $code in $currentSeminarCodes ) #set( $currentRegistration = $code.split("[;]") ) #set( $villageCode = $currentRegistration[0] ) #set( $url = $currentRegistration[1] ) village code is: ${villageCode}<br> URL is: ${url}<br> #end #end

 

 the data in lead.myClient_competition_data_s1 is

 

J14;https://connectnz.zoom.us/w/85913813084?tk=-BY1TYFnFUcunjYFy6gBMa9i5GnHMSevGzK_NTVPlE0.DQMAAAAUANzAXBY2YU5HNGFRY1I3ZUNQcTlSWUhHWS1RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&uuid=WN_6PS9NYWBQUanBUbx8gYh1A|J16;https://connectnz.zoom.us/w/82469765242?tk=UXvOFMI9LIxYokuUfX67zbWo7_QreL704EKdBe_GI6U.DQMAAAATM5TAehZNWXpkQmlkYlR4V2VPOVJqYXI4SHlRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&uuid=WN_rywc1dQsQ6uGPpjwSblh7g|

 

This is the output:

 

village code is: J14 URL is: https://connectnz.zoom.us/w/85913813084?tk=-BY1TYFnFUcunjYFy6gBMa9i5GnHMSevGzK_NTVPlE0.DQMAAAAUANzAXBY2YU5HNGFRY1I3ZUNQcTlSWUhHWS1RAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA& village code is: J16 URL is: https://connectnz.zoom.us/w/82469765242?tk=UXvOFMI9LIxYokuUfX67zbWo7_QreL704EKdBe_GI6U.DQMAAAATM5TAehZNWXpkQmlkYlR4V2VPOVJqYXI4SHlRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&

 

As you can see, the URL is getting truncated at the &.
What silly thing am I missing?

Cheers

Jo

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Can’t repro this with your exact data and code.

 

Is there any difference between Preview and a real email here? How about HTML and Text parts?

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
May 19, 2022

Can’t repro this with your exact data and code.

 

Is there any difference between Preview and a real email here? How about HTML and Text parts?

Jo_Pitts1
Jo_Pitts1Author
Community Manager
May 19, 2022

Grrr.. got bitten by the 'Never trust velocity in preview or test send'!!!!!!

Did a real send, and it seems fine.  What a numpty I am 🙂