Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

icalendar - HTML in iCal attachment

Can an iCal attachment contain HTML in the description property? If so, what are the restrictions?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After doing some research and testing. The answer is a qualified no. Meaning: you could throw it in there, but you shouldn't.

It is not strictly forbidden by the RFC, but DESCRIPTION is not the appropriate property for HTML content.

DESCRIPTION should be the plain text version of your content. The property X-ALT-DESC with a FMTTYPE declaration of text/html is the appropriate property for HTML content.

The following example worked in both Outlook and Gmail/Google Calendar, but does not appear to be supported by Thunderbird(w/Lightning): (please, forgive the ouput. it was generated by Outlook)

X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
    N">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server ve
    rsion 08.00.0681.000">
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- Converted f
    rom text/rtf format -->

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG
    ="en-us"><FONT FACE="Calibri">Is this in HTML?</FONT></SPAN><SPAN LANG="en
    -us"></SPAN><SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us
    "><FONT FACE="Calibri">Bullets:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG
    ="en-us"><FONT FACE="Calibri">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>
    </SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-
    us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> <FONT FACE="Calib
    ri">Test 1</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="
    Calibri">2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN LANG="en
    -us"> <FONT FACE="Calibri">Test 2</FONT></SPAN><SPAN LANG="en-us"></SPAN><
    SPAN LANG="en-us"></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPA
    N LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>

</BODY>
</HTML>

Like any HTML rendering in an email client supported tags and styles are limited.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...