I have an xml data that I am transforming using xsl stylesheet to form content of the mail body, and I use the SPUtility.SendEmail method to send the mail. I have two links, one to view an infopath form and another to approve/reject task form. The infopath form link works properly in my mail but not the other one. I get the "url is blocked for security" error in Outlook web client.
<a title="Approve/Reject" style="color:#b94e0a;text-decoration:underline;">
<xsl:attribute name="href">
<xsl:text>http:/stage/_layouts/WrkTaskIP.aspx?List=91be5c14%2D6eea%2D4223%2D802e%2D7fa28b5d14ba&ID=</xsl:text>
<xsl:value-of
select="substring-before(/SRWorkflowDetails/SRLevel[level=$level and contains(Approver,$Id)]/URL,';')"
disable-output-escaping="yes"/>
<xsl:text>&Source=http://stage/_layouts/WrkStat.aspx?List=089f13be%2D3147%2D4818%2Da30e%2Da332cb63195d&WorkflowInstanceID=</xsl:text>
<xsl:value-of
select="substring-after(/SRWorkflowDetails/SRLevel[level=$level and contains(Approver,$Id)]/URL,';')"
disable-output-escaping="yes"/>
</xsl:attribute>
Approve/Reject
</a>
The output formatted link is
<a
title="Approve/Reject"
style="color:#b94e0a;text-decoration:underline;"
href="http:/stage/_layouts/WrkTaskIP.aspx?List=91be5c14%2D6eea%2D4223%2D802e%2D7fa28b5d14ba&ID=35&Source=http://stage/_layouts/WrkStat.aspx?List=089f13be%2D3147%2D4818%2Da30e%2Da332cb63195d&WorkflowInstanceID=11e09c76-29ec-4c7f-ace3-ad7a8c9e7b44">
Approve/Reject
</a>
When i copy and paste the url in browser i get a prompt saying "unexpected error has occurred", then i replace the &
with & in the browser, i get my form opened correctly.
Is this any parsing issue with outlook, but the other link which has &
is working for me??