jaredlt / add_to_calendar

A ruby gem to generate 'Add To Calendar' URLs for Android, Apple, Google, Office 365, Outlook, Outlook.com and Yahoo calendars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ampersand (&) in Subject for Outlook.com & Office 365 renders as &

jaredlt opened this issue · comments

Problem

When you pass a Subject with an ampersand &, it displays as & (for Outlook.com and Office 365)

Eg. Birthday & Sleepover percent-encoded to: &subject=Birthday%20%26%20Sleepover

Test link

86272129-fca75e80-bbc5-11ea-899c-b4d2af892012

This appears to be a bug on Microsoft's side.

Solution

  • Detect and replace & with and? (but only for Outlook.com and Office 365 and only for the Subject field)

Fixed in v0.2.5