TL;DR
Why do my custom url scheme links only work if they are appended with Microsoft's hidden bookmark _GoBack_GoBack?
Background
Because links aren't clickable on PDFs displayed in a UIWebView
or a QLPreviewController
, I was experimenting with using Word documents instead.
I discovered that normal http
and mailto
links work fine, but I've discovered a peculiarity when using custom url schemes.
While editing, Microsoft Word appends hidden bookmarks for it's own reference as you're navigating. One such bookmark is "_GoBack". This is input at the last place you typed.
Issue
The Word document I have created for my test looks like this:
With the following hyperlinks underneath:
When I load this document in my iOS app in a QLPreviewController, only the last link that I edited is clickable, and it seems to be due to the presence of the "_GoBack" as this information has been appended to the end of my link
Where long clicking on the last link produces open url action sheet. The other links seem to just be treated like normal text:
--
Not that I thought it would, but appending the _GoBack
manually to links doesn't work.
--
Question
Has anybody got even the slightest idea what's going wrong?