I have a URL that contains parameters. I'm trying to create a mailto command that will open the link of the current window's URL. I am currently using the following JS to call the function, but it truncates the URL after the "&" sign.
<a href="mailto:?subject=Report&body=[sub]" onclick="this.href = this.href.replace(''[sub]'',window.location)">email</a>
This returns "http://www.mydomain.com/reportname?SiteCode=0027" in the body of the email, but the URL is actually listed below as it is passing variables: http://www.mydomain.com/reportname?SiteCode=0027&CustomerCode=ALLCUSTOMERS&JobCode=ALLJOBS
How can I output the entire URL including the parameters to an email?