I’ve noticed that when using $link in AppleScript, the entire URL is encoded, and not each individual component on the query string. This has the undesirable effect of encoding the “&” that separate query parameters. This is breaking links in my particular use case, saving a link to an O365 webmail message link in the note of an OmniFocus task while using “Hook to New OmniFocus.”
What I’m seeing:
https://outlook.office.com/owa/?ItemID=...%26viewmodel=ReadMessageItem%26path=%26exvsurl=1
What I’m expecting:
https://outlook.office.com/owa/?ItemID=…&viewmodel=ReadMessageItem&path=&exvsurl=1
Is this the expected behavior is there another way I should be approaching this? The hook itself works fine (without encoding), just the link written to the OmniFocus note is broken. Thanks in advance!