Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening an ical blob url crashes the app #24473

Open
data-sync-user opened this issue Jan 31, 2025 · 1 comment
Open

Opening an ical blob url crashes the app #24473

data-sync-user opened this issue Jan 31, 2025 · 1 comment

Comments

@data-sync-user
Copy link
Collaborator

data-sync-user commented Jan 31, 2025

Trying to open a blob url with an embedded ical crashes the app ( but works on Safari ). Below is an example of a reduced testcase ( also hosted live here for quick testing ):

const ICAL_CONTENT = `BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Your Organization//Your Product//EN
    BEGIN:VEVENT
    UID:[email protected]
    DTSTAMP:20231010T090000Z
    DTSTART:20231010T090000Z
    DTEND:20231010T100000Z
    SUMMARY:Sample Event
    DESCRIPTION:This is a sample event description.
    LOCATION:Wonderland
    END:VEVENT
    END:VCALENDAR`
      .split("\\n")
      .map(s => s.trim())
      .join("\\n");

const blob = new Blob([ICAL_CONTENT], {type: "text/calendar;charset=utf-8"});
const blobUrl = URL.createObjectURL(blob);

const downloadLink = document.createElement("a");
downloadLink.href = blobUrl;
downloadLink.textContent = "Download iCal File";
document.body.appendChild(downloadLink);

You can also access the same code here live.

┆Issue is synchronized with this Jira Bug

@data-sync-user
Copy link
Collaborator Author

➤ Issam Mani commented:

I haven’t debugged further but I suspect that the SF thing we use only supports specific schemes. Will double check later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant