Problem with Email a Link

When you create a document Library you have the option to make a copy by using the 'send to' functionality:

screen1

In the 'send to' menu, you have the option to 'email a link', which will open up outlook or another email client with the link included to your document. If you use the link to open up your document you get a dialogbox whether you want to open or save the file. If you choose to save, this will work fine but if you try to open it, it will not do a thing.

The cause of this problem is something that you can see by just looking at the link:

screen2

You can see that the dots in wss.u2ucourse.com has been replaced with %2E. If you change them back to dots('.') and try to redo this again, it will work fine. Off course this is not something that you can tell to your users to replace these things.

I had a deep dive and I found the you can fix this by changing something to the JavaScript code that SharePoint uses.

First, open up the CORE.JS, which is a JavaScript file that SharePoint uses. You can find this file by following address:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033

As you can see, 1033, you can have different CORE.JS files per language. Open this file and locate following line of code:

fileUrl=escapeProperly(httpRootWithSlash.substr(0, slashLoc))+currentItemUrl;

and replace it with

fileUrl=httpRootWithSlash.substr(0, slashLoc)+currentItemUrl;

Save your CORE.JS file, go back to your page empty your cache or use CTRL+ F5 to reload your page and try the 'Email a link' again:

screen3