add-event-to-calendar-docs icon indicating copy to clipboard operation
add-event-to-calendar-docs copied to clipboard

Outlook converts spaces to plus signs (with workaround)

Open jerry-knight opened this issue 4 years ago • 9 comments

In Chrome and Firefox, when creating Outlook calendar events using a URL like your example:

https://outlook.live.com/calendar/0/deeplink/compose?path=/calendar/action/compose&rru=addevent&startdt=2020-12-31T19:30:00Z&enddt=2020-12-31T22:30:00Z&subject=Birthday&body=With%20clowns%20and%20stuff&location=North%20Pole

Outlook converts all spaces to plus signs in the subject and body. No amount of encoding the spaces in the URL (%20 vs +) makes any difference.

The only workaround I've found is to convert spaces to thin space. The URL encoding is %E2%80%89, and from my testing, Outlook properly renders the thin spaces. No telling whether it affects other Outlook functions, but it's better than plus signs everywhere.

Additional note: I haven't done extensive browser testing, only Chrome and Firefox. I'm not sure if this issue is browser-dependent.

jerry-knight avatar Oct 20 '20 18:10 jerry-knight

Hey, I found this issue too, you can encode spaces using new line (%0A) and then use <br/> for any new lines. Not sure if it is better than your solution but it might be useful 👍

Pjaerr avatar Nov 03 '20 13:11 Pjaerr

I've had issues with using <br />, as the message gets truncated after it. However, using the HTML entity for a space (&#32;, or %26%2332; in the URL) does appear to work.

It also appears to work in the title, whereas %0A didn't for me.

SquidDev avatar Nov 03 '20 14:11 SquidDev

I've had issues with using <br />, as the message gets truncated after it. However, using the HTML entity for a space (&#32;, or %26%2332; in the URL) does appear to work.

It also appears to work in the title, whereas %0A didn't for me.

I've verified that this works in the title and body. It doesn't appear to work in the location, but I still think this is a better solution overall than thin spaces. There's no telling how non-standard spaces will affect other Outlook features, like indexing, searching, sharing, etc. I stopped my thin space testing when it looked right in the edit page and calendar view.

Thanks for this solution.

jerry-knight avatar Nov 03 '20 14:11 jerry-knight

It seems that drop rru=addevent could fix the issue. Not sure if there are any other side effects.

crysislinux avatar Nov 18 '20 02:11 crysislinux

Good catch, looks good for strings with spaces encoded as %20 (i.e. not as +)

webaware avatar Nov 18 '20 03:11 webaware

The combination of removing rru=addevent and encoding spaces as %20 works for me.

SpencerRiddering avatar Feb 14 '21 22:02 SpencerRiddering

Removing rru=addevent and %20 didnt work for me, issue only occurs on first redirect after login though, subsequent loads if already logged in are ok. %0A worked for me in all cases

haveaguess avatar Feb 23 '21 22:02 haveaguess

For line breaks Im finding <br> is working well instead of <br/>

haveaguess avatar Feb 24 '21 11:02 haveaguess

Feels like this https://outlook.live.com/calendar/0/deeplink/compose link is broken again?

Maybe this is tapping in at too deep a level and it prone to break?

The OWA level seems to work still

https://outlook.live.com/owa?rru=addevent&startdt=2018-12-06T17%3A00%3A00-05%3A00&enddt=2018-12-06T18%3A00%3A00-05%3A00&subject=Happy%20Hour&location=Boston%2C%20MA&body=Let%27s%20go%E2%80%89after%20work&allday=false&to=ritch%40gmail.com%2Ctestie%2Bcto3%40gmail.com%2Cchloe92%40gmail.com%2Cgamd%40hotmail.com&uid=1616766867211&path=%2Fcalendar%2Fview%2FMonth

haveaguess avatar Mar 26 '21 16:03 haveaguess