[英]ICS file rendering raw HTML when opened in Microsoft Outlook 2016 but not in MS Outlook 2013
I have ICS file which is created from T4 template as follows.我有从 T4 模板创建的 ICS 文件,如下所示。
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
BEGIN:VEVENT
DTSTART:20190129T013000Z
DTend:20190129T023000Z
SUMMARY;ENCODING=QUOTED-PRINTABLE: Hasitha Dananjaya
LOCATION;ENCODING=QUOTED-PRINTABLE:
DESCRIPTION;CONTENT-TYPE:text/html:ENCODING=QUOTED-PRINTABLE:<p>test test</p><p> </p><p> </p><p>test line 2</p>=0D=0A=0D=0A
X-ALT-DESC;FMTTYPE=text/html:<p>test test</p><p> </p><p> </p><p>test line 2</p>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
CATEGORIES:Business
PRIORITY:3
END:VEVENT
END:VCALENDAR
When its opened from MS Outlook 2016 it shows raw html values as follows.当它从 MS Outlook 2016 打开时,它显示如下原始 html 值。
But same file opened in MS Outlook 2013但是在 MS Outlook 2013 中打开了相同的文件
I did make sure both of the clients are running HTML mode.我确实确保两个客户端都运行 HTML 模式。
I'm just trying to figure out what could be the root cause for this.我只是想弄清楚这可能是什么根本原因。 Any help is appreciated.任何帮助表示赞赏。
Do reverse engineering, create the file from Outlook 2016. Save the ICS file and open and view the content.执行逆向工程,从 Outlook 2016 创建文件。保存 ICS 文件并打开并查看内容。
Then use this content to replace the logic how it generates.然后使用此内容来替换它如何生成的逻辑。
Actual issue was with DESCRIPTION and X-ALT-DESC fields.实际问题是描述和 X-ALT-DESC 字段。
According to RFC2445 DESCRIPTION is to specify the plain text body of an appointment and X-ALT-DESC is there to provide alternate format for the DESCRIPTION property with HTML.根据 RFC2445 描述是指定约会的纯文本正文,而 X-ALT-DESC 是在那里为带有 HTML 的描述属性提供替代格式。
RFC - X-ALT-DESC RFC - X-ALT-DESC
Somehow MS OUTLOOK 2013 reads X-ALT-DESC by default where OUTLOOK 2016 reads DESCRIPTION by default.不知何故,MS OUTLOOK 2013 默认读取 X-ALT-DESC,而 OUTLOOK 2016 默认读取描述。 2016 falls back to X-ALT-DESC only when DESCRIPTION is not there.仅当没有说明时,2016 才回退到 X-ALT-DESC。
Therefore, Fix was to keep ICS file as follows.因此,Fix 是按如下方式保留 ICS 文件。
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
BEGIN:VEVENT
DTSTART:20190201T013000Z
DTend:20190201T023000Z
SUMMARY;ENCODING=QUOTED-PRINTABLE: Hasitha Dananjaya
LOCATION;ENCODING=QUOTED-PRINTABLE:
DESCRIPTION:\naaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
X-ALT-DESC;FMTTYPE=text/html:<p>aaaaaaaaaaaaa</p><p>aaaaaaaaaaaaaaaaaaaaaaa</p><p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><p>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</p>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
CATEGORIES:Business
PRIORITY:3
END:VEVENT
END:VCALENDAR
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.