We have a file share at work (one I do not have the power to rename) and it contains a space in it:

\\WorkFileShare\Visual Studio\SP1

I'm creating a Wiki Entry that informs users they can locate the VS2010 SP1 download on this Share.

For some reason, SharePoint will highlight and hyperlink the UNC up to the space. (I've been dealing with this behavior for years in Outlook and I fix by putting focus on the character before the space and then hitting backspace to remove the formatting).

Simple enough and SharePoint also removes the formatting when you backspace on the character before the space.

However, as soon as I move away from the link, SharePoint goes right back to highlighting and hyperlinking what it thinks is the UNC.

Naughty Sharepoint!!

So does anyone have any idea how to clear the formatting?

NOTE: Highlighting the text and clicking on the "Clear Format" icon does not work.

  • Tumbleweed badge! Yay! – ray023 Apr 1 '11 at 20:34

While editing a SharePoint Wiki Article. Do the following:

  1. Type (or Paste) your UNC filepath containing the space (e.g. \WorkFileShare\Visual Studio\SP1) (SharePoint should autoformat this to a hyperlink)
  2. Click the Edit HTML Source Icon
  3. Find the UNC Path in the HTML Markup (I usually copy and paste the markup into Notepad++ because I need color-coded help :P ) The link will look something like this:
    <A href="file://\\WorkFileShare\Visual">\\WorkFileShare\Visual</A> Studio\SP1
  4. The href portion will cut off after the first space. You will need to complete the rest of file link and replace spaces with %20.
  5. Move the closing anchor html (</a>) to the end of text
  6. Click OK

Once finished, the html should look something like this:

<A href="file://\\WorkFileShare\Visual%20Studio\SP1">\\WorkFileShare\Visual Studio\SP1</A>

Even after I doing this, clicking on the link did nothing; which probably has something to do with SharePoint.

However, I can right-click on the link, select copy shortcut, paste that shortcut into a browser window.

  • The problem with this answer is that it corrupts the original URL. \\WorkFileShare\Visual Studio\SP1 became (just what was inside the HREF quotes): file://\\WorkFileShare\Visual so, moving the final anchor (</a>) fixes the DISPLAYED link, but not the actual address. The root issue here seems to be that the original UNC link destination includes spaces, which are not allowed in HTML addresses/links. So, I suspect that all spaces or other special characters will need to be replaced with their corresponding escape codes (e.g. space &rarr; %20). – user124158 Mar 21 '12 at 21:12
  • The information helped me improve my answer so thank-you for that. Final note, my answer does not corrupt the URL; SharePoint is the culprit of that. – ray023 Mar 23 '12 at 13:33
  • technically, the space in it is not a corruption, but a malformation. spaces are not allowed in URLS. They are also not really allowed in file paths either unless it is delimited by quotes – horatio Mar 23 '12 at 13:55
  • hirogen - sorry I missed you in the #sharepoint irc - I was feeding sheep. I'm glad you figured it out. I hate Sharepoint, don't you? – bgmCoder Apr 9 '18 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.