nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
949 stars 232 forks source link

Event entries with UTF-8 BOM elements in Text are not loaded, shown and after export cannot be imported #6043

Closed fuco809 closed 4 weeks ago

fuco809 commented 1 month ago

Steps to reproduce

  1. example file attached - which where exported from a nextcloud calendar
  2. import calendar to new calendar fails (1 of 2)
  3. calendar not loads. (when selected month is oct 2024) test-utf8-bom-event.ics.txt

Expected behavior

online created events should automatically strip UTF8 BOM Codes oder other unliked char elements

Actual behaviour

bomsceeni

elements like "NBSP" or "xEF xBF xBE" are not removed and makes some troubles (not showing events, export/import errors).

Calendar app version

4.7.4

CalDAV-clients used

No response

Browser

No response

Client operating system

No response

Server operating system

No response

Web server

Apache

Database engine version

MariaDB

PHP engine version

PHP 8.2

Nextcloud version

27.1.9

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

No response

tcitworld commented 1 month ago

This could be fixed with a dedicated repair step in the calendar-js libary : https://github.com/nextcloud/calendar-js/tree/main/src/parsers/repairsteps/icalendar

sanskar-soni-9 commented 4 weeks ago

Hi, I was digging into it and found that its not BOM but Unicode Special Non-characters i.e. U+FFFE & U+FFFF. As if it was BOM then U+FEFF should also break and cause errors but it worked well when I tested it.

Raising PR in calendar-js repo 🙂

Unicode.org | Wikipedia