1

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:

enter image description here

With the following hyperlinks underneath:

enter image description here

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

enter image description here

Where long clicking on the last link produces open url action sheet. The other links seem to just be treated like normal text:

enter image description here enter image description here

--

Not that I thought it would, but appending the _GoBack manually to links doesn't work.

enter image description here

--

Question

Has anybody got even the slightest idea what's going wrong?

Community
  • 1
  • 1
James Webster
  • 31,873
  • 11
  • 70
  • 114

0 Answers0