Skip to content

Commit

Permalink
fix: file name on ics export for subscriptions with non-ascii characters
Browse files Browse the repository at this point in the history
  • Loading branch information
ellite committed Jun 27, 2024
1 parent 92a9e84 commit b9dba06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function exportCalendar(subscriptionId) {
const a = document.createElement('a');
a.href = url;
// Use the subscription name for the file name, replacing any characters that are invalid in file names
a.download = `${data.name.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.ics`;
a.download = `${data.name.replace(/[\/\\:*?"<>|]/g, '_')}.ics`;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
Expand Down

0 comments on commit b9dba06

Please sign in to comment.