I ran this one by my friend Richard Knudson, who runs the Dynamics CRM Trick Bag at
http://www.dynamicscrmtrickbag.com/. The URL transmorgrifier in CRM doesn't work properly, and there's no capability to switch it to raw HTML like in the adxStudio CMS end-user editor tools.
What Richard came up with is to create a custom attribute for the Contact for the Invitation URL. He added a little Jscript to the Contact Form OnLoad event to concatenate the various pieces into a single URL, then wrote that value to a custom
InvitationURL attribute. Once that's there you can pick it up and use it in the email template variable.
The CRM email template editor is not one of the best parts of CRM yet, but Knudson's trick solves these types of problems fast.