Web Hyperlinks Misfire On Spaces in Query

J

Joshua Yeidel

I have a client with a Word document which is a hyperlinked list of
exhibits in a SharePoint document library on the Web. The links point to
files or folders in the SharePoint library. The idea is to click on a
link in the list, and if it is a file, open it in its appropriate
application (e.g., ".doc" in Word). If it is a folder, it should open
in the web browser.

She is able to create the hyperlinked list in Word 2007 (PC, of course),
and it behaves in just this way. When the hyperlinks are clicked, all
the files and folders open as expected.

When the same hyperlinked list is opened on the Macintosh, clicking on a
file hyperlink opens the file as expected. However, clicking on a
folder hyperlink leads to an "Unable to open..." dialog box.

By some assiduous testing, I have determined that hyperlinks to folders
which have a space in the path name on SharePoint fail in this way.
Although SharePoint uses the "URL encoding" of "%20" for spaces, as HTTP
formally requires, Mac Word undoes the encoding and replaces "%20" with
a space when displaying _or activating_ the URL.

This is not harmful in the "selector" part of the URL (everything
between the hostname and the "?" query delimiter). The server is
apparently tolerant of spaces in that part of the URL. However,
SharePoint for reasons of its own includes the path in the query part of
the URL (the part after the "?"). If the query includes spaces,
SharePoint uses "%20"; Mac Word, however, translates "%20" to a space
character, which is NOT tolerated by the server. The request fails.

Note that when I toggle the field code for the hyperlink, it shows the
"%20"'s in the URL correctly. Apparently the substitution is taking
place at click-time. This means that the problem cannot be worked
around by editing the field code. In fact, I haven't found any way to
create a hyperlink to a SharePoint folder that Mac Word will activate
correctly.

I can understand the urge to simplify the _display_ of a URL without the
URL encoding (though I don't agree with it). However, passing space
characters as part of a URL request to an HTTP server is simply an error.

Has anyone else run into this? Does anyone have a workaround (or an
approach to a workaround)?

-- Joshua
 
J

Joshua Yeidel

Sorry, I forgot to specify:

Office 12.1.4
Word 12.1.3 (080930)
Mac OS X 10.5.6

-- Joshua
 
J

John McGhie

Hi Joshua:

Try enclosing the entire URI in ASCII quotes. Word should then leave it
alone (no guarantees...). The other thing you could try is to express the
entire URI in hexadecimal (leaving the display name in English). You might
get away with it :)

Basically, Office 2008 is not compatible with SharePoint, and I am surprised
that anything works at all there.

Office 2010 for Mac should be a lot better in this regard -- full SharePoint
compatibility is high on the wishlist.

Hope this helps


Sorry, I forgot to specify:

Office 12.1.4
Word 12.1.3 (080930)
Mac OS X 10.5.6

-- Joshua

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 
J

Joshua Yeidel

Thanks for your prompt reply, John. Though I'm a long-time participant
in the Entourage-talk list, and have deep respect and gratitude for
Diana Ross, Paul Berkowitz, and the other MVP's there, this is my first
occasion to visit the Word forum. I'm grateful that the same high
standards are in action here.

I added quotes inside the field code without success using either
single-quotes (') or double-quotes ("). I didn't try the all-hex
approach, because the URL is huge and already has several hex codes in
ti which would have to be worked around -- and the list contains about
60 URLs! Even if it works, it won't be a practical approach for our
situation.

If I toggle the field codes in the document, and copy the URL seen there
and paste it into Firefox (my default browser), it works like a charm.
This demonstrates that the issue is a bug at click-time in Mac Word.

I'd like to point out that the problem is not limited to SharePoint; any
link with "%20" will fail if the server which won't tolerate space
characters. SInce spaces are excluded in URL's per RFC 2396 Section
2.4.3, the servers have a point. In essence, Mac Word is taking a valid
URL and converting it to an invalid one.

I fondly hope that MBU will see it that way in a very near-term update,
and not wait for 2010. I sent "feedback" via the web site, but I don't
know if that ever makes it to someone with influence.

-- Joshua
 
J

John McGhie

Hi Joshua:

Thanks for your prompt reply, John. Though I'm a long-time participant
in the Entourage-talk list, and have deep respect and gratitude for
Diana Ross, Paul Berkowitz, and the other MVP's there, this is my first
occasion to visit the Word forum. I'm grateful that the same high
standards are in action here.

Why thank you! But they are a grumpy bunch of old codgers over there. We
are a much nicer bunch of grumpy old codgers :)
I fondly hope that MBU will see it that way in a very near-term update,
and not wait for 2010. I sent "feedback" via the web site, but I don't
know if that ever makes it to someone with influence.

What was that about "Hope springs eternal in the human breast"?? :)

Yes, the Send Feedback mechanism makes it directly to Courtney, who is a
fairly senior manager in the Microsoft Macintosh Business Unit. Last I
heard, Courtney actually processes the feedback herself. Courtney is one of
about five people who will be sitting around the table when the Go/No Go
decisions get made for the next version.

However, they are working on the next version right now. They're simply not
going to drag the programming team off that, to rake out the HTML engine in
the previous versions to fix this bug.

What "might" happen is that if they get this fixed in the next version, they
"might" be able to retro-fit the fix. Sadly, 2008, 2004, X, and 2001 all
seem to use a different mechanism in this area.

I always believed that the "best" one was 2001, which simply called Internet
Explorer. Mac IE 5 was one of the finer browsers ever made, if you remember
back that far :)

Cheers
-- Joshua

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top