Ask a questionAsk a question
 

QuestionPound sign(#) in filename causes invalid link

  • Thursday, November 20, 2008 7:05 PMcb73 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I was pretty excited to try this out in the office when I got home from Tom Rizzo's session at Vegas Dev Connections. 

     

    I setup a prototype web to crawl a small folder on our file server and immediately ran into an issue.  It seems that when Word or Excel filenames contain a pound sign (#), the search result icons show the generic iExplore icon and the files do not launch properly.  An example filename would be \\fileserver\documents\Form #123.xls.

     

    When a Word link with a pound sign is clicked, the open or save dialog is presented, but the file simply will not load.  When an Excel link with a pound sign is clicked, the open or save dialog is presented, an error message is thrown ("\\fileserver\documents\Form cannot be found. Check your spelling, or try a different path”), but the file loads anyway.  I thought maybe the HREF parameter was interpreting the pound sign as a bookmark, instead of part of the filename.

     

    I copied the anchor tags for some offending files to a plain html file and verified that these files will not load from there either.  From there, I tried to see if there was some escape character (%23, ##, etc) I could use to interpret the pound sign and get the files to load so I could tweak the Search Result's XSLT file, but I found none.

     

    Does anyone have a workaround for this behavior?

All Replies

  • Thursday, November 20, 2008 10:57 PMcb73 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    follow up...

    I found this seemingly related article (http://support.microsoft.com/kb/202261).  I employed the paste special hack listed to get the link embedded into a Word file and it seemed to work.  I then saved the Word file as HTML, hoping it would render some obscure syntax trick, but the link was bad in this file too.  I even pried the Word document open with 7Zip to look at the document.xml file, but found nothing useful for web pages.

  • Saturday, March 28, 2009 10:55 PMTomSimon Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Did you ever resolve this issue?

    I have some files on my web server that cannot be downloaded due to the pound signs in them.

    Thanks.
  • Monday, October 26, 2009 9:49 PMcb73 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    sadly, no.