Issue on string variable html encoding
Hi Friends,There is a simple scenario where I am facing some html encoding issue. I have a class file where I am assigning local string variable value with html tagging (This string variable contains the comma separated multiple values.).
workitemList = workitemList + HttpUtility.HtmlEncode("<a target=\"_new\" href=\"" + buildDetail.BuildServer.TeamProjectCollection.Name.ToString() + "/" + buildDetail.TeamProject + "/_workitems#id=" + workitem.Id + "&_a=edit \>" + workitem.Id + "</a>") + ", ";
And here we are using this string variable in our .xslt file for email notification html format.
<tr>
<td>5</td>
<td>Associated WorkItem(s)</td>
<td>
<xsl:if test="EmailParameters:get_BuildStatus()='Succeeded'">
<xsl:value-of select="EmailParameters:get_BuildWorkItemlists()" />
</xsl:if>
</td>
</tr>
Now the issue is coming On email notification, this variable value is displaying with all html coding.
5 Associated WorkItem(s) <a target="_new" href="http://localhost:8080/tfs12/tc2012/Lg_Test/_workitems#id=68&_a=edit ">68</a>, <a target="_new" href="http://localhost:8080/tfs12/tc2012/Lg_Test/_workitems#id=69&_a=edit ">69</a>
Please help, I tried many thing to get it done and no luck.
i tried
HttpUtility.HtmlEncode
Uri.EscapeDataString
using html decoded < and >
but nothing done.