Reputation: 851
How to transform html formatting tags, such as <b>
, <i>
, etc. for iCal so text would look like in html? I just found for new line, but would be grateful for any information about formatting tags.
Upvotes: 0
Views: 691
Reputation: 29020
The only place you want to put HTML in an icalendar is in the X-ALT-DESC. There's no special encoding needed because angle brackets have no special meaning in icalendar. You just need to be careful with line breaks. You need to wrap your HTML to no more than 75 characters, and wrapped lines need to start with a space. You have a limited subset of HTML to play with. No scripts, and styles need to be defined as element attributes. So the full field would look like this...
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E
N">\n<html>\n<body>\n<table border="1"><tr><td>\n<b>HTML</b> Description o
f event added to feed\n</td></tr><tr><td>\n<ul><li>HTML has certain advantages
</li></ul>\n</td></tr></table>\n</body>\n</html>
Upvotes: 1
Reputation: 39
Probably only way to do this is "Binary Content" - look at iCal format specyfication:
https://www.ietf.org/rfc/rfc2445.txt
Upvotes: 0