Fix output of html description in icalendar format

Đang mở
#3,206 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu từ URL xuất DAV của lịch công khai và so sánh VEVENT DESCRIPTION của nó với tệp ICS mẫu được cung cấp và các đặc tả iCalendar được liên kết. Công việc hoàn tất khi DESCRIPTION chứa văn bản thuần túy dễ đọc và HTML được giữ nguyên trong một hoặc nhiều thuộc tính thay thế được hỗ trợ mà không làm hỏng các client như Thunderbird.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

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).

Ngôn ngữ chính
JavaScript
Star
710
Fork
125
Merge trung bình
19 giờ 37 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/tasks

Tất cả issue của nextcloud/tasks

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.