SharePoint 2007 changes links with targets. Pound sign (#) is changed to percent23 (%23). This is with the Link to a Document doc type. Workaround? RRS feed

  • Question

  • The subject says it all, or most of it.  I am trying to build a library primarily comprised of links to documents on another server.  Some of those links point to named anchors within documents, so the link might be something like, http://www.somesite.org/ownersmanual.html#section2

    When using the Link to a Document doc type, SharePoint converts that # sign into a %23 (that is to say, when the end user clicks on the link they get a 404 error saying http://www.somesite.org/ownersmanual.html%23section2 cannot be found).  Now if this area was nothing but links I would simply use a links list, but it's not (of course not, that would be too simple), so I'm wondering, is there a workaround to get SharePoint to stop converting those # signs into %23?


    Sunday, July 8, 2012 2:06 PM


  • Hi Tony,

    Please try the following three solutions:

    1. Redirection service:

    Use a redirection service (like bit.ly, or even your own server) for the URL you publish. It will provide a standard link that Twitter will allow and send it to the correct page on your site. These services can also make the URL much shorter, which is a plus for Twitter posts.

    2. Custom 404:

    Implement a custom 404 page on your site and when specific URLs, like your example come in, correct the encoding and redirect to your correct page.

    3. Simply add a ? to your link!:

    The ? character marks the end of the file specification and the start of parameters. Parameters are not actually required before a bookmark so this URL should work for your link:
    will call
    which is the same as:

    Lhan Han

    Monday, July 16, 2012 7:31 AM