nextcloud / nextcloud/tasks

Fix output of html description in icalendar format

Open
#3,206 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
706
Forks
117
Avg merge
8h 50m
Merged PRs (30d)
18

Description

When viewing a calendar in iCal format via a link such as "https://.../remote.php/dav/public-calendars/...?export" the DESCRIPTION property for the VEVENT objects contains html formatted text. But as the property is meant to contain plain text, clients such as Mozilla Thunderbird show the html encoding of text which makes the text look very mangled for a user. There seem to be some ways of adding html versions of the description:

  • In the X-ALT-DESC property, which appear to be the first way, as supported by Microsoft's outlook/exchange (I haven't tested that) and eM Client - description (near bottom), spec, example
  • In the ALTREP parameter on the DESCRIPTION property as supported by e.g. Thunderbird (though only when used with data-urls -- which also seems to be easiest) - implementation of detection (note that in data-urls spaces should be encoded as %20 not +, spec, example
  • In the STYLED-DESCRIPTION property which doesn't seem to be well supported but seem most "clean" - spec

Could you please add the html text to one or more of these properties/parameters (ie. X-ALT-DESC and ALTREP, while there is probably no need for STYLED-DESCRIPTION) and put a plain text version in the description field (ideally something akin to a markdown encoding such that links will appear in the text (maybe using a library like this that can convert html to markdown and strip unsupported tags).

This sample file contains an event recurring on Mondays with a html description encoded in all three ways, in addition to html in the description to check how that is handled (remove .txt extension to test in your client).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the public-calendar DAV export URL and compare its VEVENT DESCRIPTION with the supplied sample ICS file and the linked iCalendar specifications. The work is done when DESCRIPTION contains readable plain text and the HTML is preserved in one or more supported alternate properties without mangling clients such as Thunderbird.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.