Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
426 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?

question from:https://stackoverflow.com/questions/854036/html-in-ical-attachment

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

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...