Can an iCal attachment contain HTML in the description property? If so, what are the restrictions?
So, in short, the answer to your original question is that iCal info window does not, and is not supposed to, support HTML.
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">\n<HTML>\n<HEAD>\n<META NAME="Generator" CONTENT="MS Exchange Server ve
rsion 08.00.0681.000">\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n<!-- Converted f
rom text/rtf format -->\n\n<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>\n\n<P DIR=LTR><SPAN LANG="en-us
"><FONT FACE="Calibri">Bullets:</FONT></SPAN></P>\n\n<P DIR=LTR><SPAN LANG
="en-us"><FONT FACE="Calibri">1. \; \; \; \; \;</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>\n\n<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="
Calibri">2. \; \; \; \; \;</FONT></SPAN><SPAN LANG="en
-us"> <FONT FACE="Calibri">Test 2</FONT></SPAN><SPAN LANG="en-us"></SPAN><
SPAN LANG="en-us"></SPAN></P>\n\n<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPA
N LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>\n\n</BODY>\n</HTML>
Like any HTML rendering in an email client supported tags and styles are limited.
HTML in the description won't be rendered as HTML in Outlook, at the least. If you want to include rich text that Outlook will recognize, export an event from your Outlook calendar, and take a look at what they do. I believe they provide plain-text in the Description and then create another property for the HTML.
For anyone happening upon this page like I did and is looking to specifically have HTML content displayed for Outlook events...
As the accepted answer states, the DESCRIPTION shouldn't have any HTML. However, you can get HTML into the content of the event (at least in Outlook) using a multipart/alternative email.
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="_CAL_B598a1969806776.58663423_B_"
To: "Your Name" <[email protected]>
From: "John Doe" <[email protected]>
--_CAL_B598a1969806776.58663423_B_
Content-Type: text/html; charset="iso - 8859 - 1"
Content-Transfer-Encoding: quoted-printable
<html><body>
<h1>Hello World</h1>
<p>This is a calendar event test</p>
</body></html>
--_CAL_B598a1969806776.58663423_B_
Content-Type: text/calendar; charset="utf - 8"; method=REQUEST
Content-Transfer-Encoding: base64
QkVHSU46VkNBTEVOREFSDQpNRVRIT0Q6UkVRVUVTVA0KUFJPRElEOi0vL1BIUC8vTWVl
dGluZ1JlcXVlc3QvL0VODQpWRVJTSU9OOjIuMA0KQkVHSU46VkVWRU5UDQpPUkdBTkla
RVI7Q049Sm9obiBEb2U6TUFJTFRPOmpvaG4uZG9lQGV4YW1wbGUuY29tDQpBVFRFTkRF
RTtST0xFPVJFUS1QQVJUSUNJUEFOVDtQQVJUU1RBVD1ORUVEUy1BQ1RJT047UlNWUD1U
UlVFO0NOPVlvdXIgTmFtZTpNQUlMVE86eW91cm5hbWVAZXhhbXBsZS5jb20NCkRFU0NS
SVBUSU9OOkhlbGxvIFdvcmxkIEV2ZW50DQpTVU1NQVJZOkhlbGxvIFdvcmxkIEV2ZW50
DQpEVFNUQVJUOjIwMTcwODE1VDE5MDAwMFoNCkRURU5EOjIwMTcwODE1VDIwMDAwMFoN
ClVJRDowMTIzNDU2Nzg5DQpDTEFTUzpQVUJMSUMNClBSSU9SSVRZOjUNCkRUU1RBTVA6
MjAxNzA4MDhUMjAwNDU3Wg0KVFJBTlNQOk9QQVFVRQ0KU1RBVFVTOkNPTkZJUk1FRA0K
U0VRVUVOQ0U6MA0KTE9DQVRJT046MTIzIEFueSBTdHJlZXQNCkJFR0lOOlZBTEFSTQ0K
QUNUSU9OOkRJU1BMQVkNCkRFU0NSSVBUSU9OOlJFTUlOREVSDQpUUklHR0VSO1JFTEFU
RUQ9U1RBUlQ6LVBUMTVNDQpFTkQ6VkFMQVJNDQpFTkQ6VkVWRU5UDQpFTkQ6VkNBTEVO
REFS
--_CAL_B598a1969806776.58663423_B_--
In case you are wondering, that Base64 encoding translates to:
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:-//PHP//MeetingRequest//EN
VERSION:2.0
BEGIN:VEVENT
ORGANIZER;CN=John Doe:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Your Name:MAILTO:[email protected]
DESCRIPTION:Hello World Event
SUMMARY:Hello World Event
DTSTART:20170815T190000Z
DTEND:20170815T200000Z
UID:0123456789
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20170808T200457Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION:123 Any Street
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With