Google calendar event descriptions contain HTML tags but Thunderbird renders descriptions as plain text
Categories
(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect, P2)
Tracking
(thunderbird_esr78+ wontfix, thunderbird80 affected, thunderbird81 fixed, thunderbird83 fixed, thunderbird84 affected)
People
(Reporter: aryx, Assigned: pmorris)
References
Details
Attachments
(4 files, 1 obsolete file)
Thunderbird 78.1.1 on Windows 8.1
Thunderbird's Lightning replaces the content of messages from Google Calendar about event invitations/updates with its own display. Sometimes, it renders the event description with HTML as plain text (right side of screenshot, left side Thunderbird 68.x with Lightning disabled).
From a different email with the issue: The .ics has the description field starting like this:
DESCRIPTION:<br>Password to join the meeting: <span>
Keeping this as a separate bug which is only about not displaying raw HTML.
Comment 1•4 years ago
|
||
IIRC the standards do not allow HTML in the description.
Anyway, this causes major problems with Google calendar invites, so we should find a solution.
For bug 1607834, there's also X-ALT-DESC to handle - but at least that's standards compliant.
Assignee | ||
Comment 2•4 years ago
|
||
Apparently DESCRIPTION is a plain text property in the icalendar spec:
https://icalendar.org/iCalendar-RFC-5545/3-8-1-5-description.html
An HTML version of a description would go in the X-ALT-DESC property (with a FMTTYPE declaration of text/html):
https://stackoverflow.com/questions/854036/html-in-ical-attachment
From discussion with Magnus today, the plan is to leave the content of the property as-is but when displaying it, display it as plain text with any html tags removed. For example, by using parserUtils.convertToPlainText
like here: https://searchfox.org/comm-central/rev/568e955cf231f8265491df1ada8800c3d0daaecd/mail/base/content/mailWindow.js#160
Assignee | ||
Comment 3•4 years ago
|
||
Google calendar puts HTML tags into calendar event descriptions,
for formatting etc., but that's not following the iCalendar spec
where DESCRIPTION is plain text. Don't show HTML tags in
descriptions in invitations.
Assignee | ||
Updated•4 years ago
|
Pushed by paul@paulwmorris.com:
https://hg.mozilla.org/comm-central/rev/c2e7b598699a
Don't show HTML tags in calendar invite event descriptions. r=darktrojan DONTBUILD
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Backed out for breaking tests:
https://hg.mozilla.org/comm-central/rev/61ba4ec62a13ffebb8c4b12e408cff6ff4f51389
Comment 6•4 years ago
|
||
Re sanitizing, there is a sanitize - https://searchfox.org/mozilla-central/source/parser/html/nsIParserUtils.idl#108
Assignee | ||
Comment 7•4 years ago
|
||
Assignee | ||
Comment 8•4 years ago
|
||
Google puts HTML tags in calendar event/task DESCRIPTION
properties, so where we display descriptions render them
as HTML rather than just showing the raw plain text.
This commit does this in these places:
- summary dialog (and ICS import dialog)
- invitation overlays in emails
- tooltips shown when mousing over an item.
Depends on D88365
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
Going in a different direction. Rather than removing the HTML tags, sanitize and render descriptions as HTML. That way links are preserved and clickable. We need to do this in several places as noted in the commit message for the patch. Plain text URLs are turned into links (as we previously did for the invitation view in an email message). A small behavior change is that "file" urls are no longer linkified (see modified test), but that seems like a worthwhile trade off. I didn't see a way to prevent this from happening.
Assignee | ||
Comment 10•4 years ago
|
||
Comment on attachment 9172305 [details]
Bug 1659363 - Render HTML in calendar item descriptions. r=darktrojan
Richard, could you take a look at the CSS for theme-ability? Namely the white background of the description and the blue link color, which I think will need some adjustment.
Comment 12•4 years ago
|
||
Comment on attachment 9172305 [details]
Bug 1659363 - Render HTML in calendar item descriptions. r=darktrojan
Looks good. Yes, white as background isn't so optimal with a dark theme. I'll attach a fixed CSS file you can then update on Phabricator.
Comment 13•4 years ago
|
||
Updated CSS file with better colours.
Assignee | ||
Comment 14•4 years ago
|
||
Thanks Richard! I've added your CSS changes to the latest revision of the patch.
Assignee | ||
Comment 15•4 years ago
|
||
Here's a try run. Failures look unrelated. https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=2680c40155e920f273e1e20a3ad18a7d39c31398&selectedTaskRun=NkkYLAvUSDqMCG6jOeTejg.0
Assignee | ||
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/f78b8f5ae8b1
Fix some typos in comments in chat code. r=clokep
https://hg.mozilla.org/comm-central/rev/d1bccebf5b42
Render HTML in calendar item descriptions. r=darktrojan
Comment 18•4 years ago
|
||
I tried a nightly build and I can't await the day of it appearing in the release channel!!!
THANKS!
Updated•4 years ago
|
Comment 19•4 years ago
|
||
We should take this for 78, but let's polish some more first (bug 1663947 at least).
Comment 21•4 years ago
|
||
Hello, I understand that these commits will allow clicking on links in the description of an event, right? It is indeed more and more useful with the increase of online meetings and link to Jitsi, Zoom, Teams, Google meet and other platforms... Really appreciated, thanks!
When do you plan to release it?
Comment 22•4 years ago
|
||
backout bugherder uplift |
Temporary backout
Thunderbird 83.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/7c2924f35b3e
Comment 23•4 years ago
|
||
NI :wsmwk since we need to remember to reapply this on beta once bug 1673164 is fixed.
Comment 24•4 years ago
|
||
Can this now be brought back, as bug1673164 appears as fixed
Comment 25•4 years ago
•
|
||
bugherder uplift |
Yes, it's lined up for the next beta.
Restored in Thunderbird 83.0b3:
https://hg.mozilla.org/releases/comm-beta/rev/1bfa718a7cd3
Updated•4 years ago
|
Comment 28•4 years ago
|
||
We should take this for 78, but let's polish some more first (bug 1663947 at least).
Will this ever be brought into 78?
Comment 29•4 years ago
|
||
Hello. Thanks for working on this. I'm running 86.0b1 and unfortunately the commit above doesn't seem to work for Microsoft Teams invitations. Teams saves links in the DESCRIPTION field sourrounded by left and right angle brackets (<) and (>). The introduced 'textToHtmlDocumentFragment' function fails to recognize this (assumably because it thinks a html tag is about to start) and removes the link instead, which is worse than at least having the text version. If you remove those brackets manually, the link is recognized correctly.
Interestingly the main email window of Thunderbird already handles that scenario correctly. Whether your email contains <www.google.com> or www.google.com it always recognizes the link and just ignores the brackets.
...
DESCRIPTION;LANGUAGE=en-US:\n\n______________
__________________________________________________________________\nMicros
oft Teams-Meeting\nJoin on your computer or mobile app\nClick here\,
to join the meeting<https://teams.microsoft.com/l/meetup-j
oin/19%3ameeting_ODFmOGFmMGItZjA3OC66MGVjLTllMzItNDNmM2QxNzViOTg1%40thread
.v2/0?context=%7b%22Tid%22%3a%222f1bf2a7-730e-4228-82d5-440fbfcb419a%22%2c
%22Oid%22%3a%229a3157f6-b6ff-4f1b-894d-baf81555bfb0%22%7d>\n ...
Comment 30•4 years ago
|
||
The teams problem is bug 1666296.
Comment 31•4 years ago
|
||
Hi Magnus, yes I've seen that. But since this commit's function was to find and convert links in plain text and it doesn't do that in this corner case (that may or may not be Teams exclusive), I thought this would be the right place. I will report it in bug 1666296 too. Thanks.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•