Hi Google Calendar team.
We sync calendar for our clients using Google Calendar API. Event.description has always been in plain text. And is supposed to be plain text, right? But recently we started running into cases of html formatted text which our code is not prepared to handle.
There is actually a very long thread about new Google apps causing this: https://productforums.google.com/forum/#!topic/calendar/r3OC4cL53NQ
Can someone from Google API team please comment on the issue?
It's actually pretty funny. A Google Cloud team sent me an invitation today and the event description is html garbage in my Mac iCal. This is all because Google Calendar apps started writing html to the field that is treated as plain text by anyone using Google Calendar API.
Even the original iCalendar standard allowed only plain text as part of an event description. HTML markup, such as font attributes (bold, underline) and layout (div, table) was not allowed in the text description field.
HTML headings <h1>
to <h6>
Line Breaks <br>
Line Breaks <br>
Horizontal rule <hr>
I suspect others will work as well (my event js below).
let remarks = '<ul><li>Coffee</li><li>Tea</li><li>Milk</li></ul><br><hr><h2>h2 tag!</h2>'
let event = {
"description":
'<hr> Super limited HTML!: ' + remarks,
"colorId": colorID,
"summary": SOtitle,
"end": {
"dateTime": end,
"timeZone": $rootScope.app.timezone
},
"attendees": attendeesArrray,
"sendUpdates": "all",
"start": {
"dateTime": start,
'timeZone': timezone
},
};
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