使用 sharepoint 发送的邮件中 Outlook 中的 url 被阻止错误
我有一个 xml 数据,我正在使用 xsl 样式表对其进行转换以形成邮件正文的内容,并使用 SPUtility.SendEmail 方法发送邮件。我有两个链接,一个用于查看信息路径表单,另一个用于批准/拒绝任务表单。 infopath 表单链接在我的邮件中可以正常工作,但在另一封邮件中则不能。我在 Outlook Web 客户端中收到“出于安全原因阻止 URL”错误。
<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>
输出格式化链接是
<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>
当我在浏览器中复制并粘贴网址时,我收到提示“发生意外错误”,然后我将 &
替换为 &在浏览器中,我正确打开了表单。
这是 Outlook 的解析问题吗,但另一个包含 &
的链接对我有用?
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??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将disable-output-escaping添加到xsl:text元素:
或者尝试删除xsl:text元素:
如果这些都不起作用,请尝试如何禁用输出转义属性?
Try adding disable-output-escaping to the xsl:text elements:
Or try doing away with the xsl:text elements:
If neither of those work, try the workaround described in How to disable output escaping for an attribute?