文件名中的井号(#)会导致链接无效 [英] Pound sign(#) in filename causes invalid link

查看:453
本文介绍了文件名中的井号(#)会导致链接无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从Tom Rizzo在Vegas Dev Connections的会议上回家时,我非常高兴能在办公室里尝试这一点。

我设置了一个原型网来抓取一个小文件夹在我们的文件服务器上并立即遇到问题。 当Word或Excel文件名包含井号(#)时,搜索结果图标显示通用的iExplore图标和文件不正确启动。示例文件名为 \\fileserver \documents\Form#123.xls

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.

当单击带有井号的Word链接时,会显示打开或保存对话框,但文件根本不会加载。 当带有井号的Excel链接为单击,显示打开或保存对话框,抛出一条错误消息(" \\fileserver\documents\无法找到表单 检查您的拼写,或尝试不同的路径"),但无论如何都会加载文件。我想也许HREF参数将英镑符号解释为书签,而不是文件名的一部分。

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.

我复制了将一些违规文件的锚标签转换为普通的html文件,并验证这些文件也不会从那里加载。从那里,我试图看看是否有一些转义字符(%23,##等)我可以用来解释英镑符号并获取文件加载所以我可以调整搜索结果的XSLT文件,但我没有找到。

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?

推荐答案

跟进......

我发现了这篇看似相关的文章( http://support.microsoft.com/kb/202261 )。我使用了列出的粘贴特殊黑客来获取嵌入到Word文件中的链接,它似乎工作。然后我将Word文件保存为HTML,希望它会渲染一些模糊的语法技巧,但这个文件中的链接也很糟糕。我甚至用7Zip撬开Word文档来查看document.xml文件,但没有发现对网页有用。

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.


这篇关于文件名中的井号(#)会导致链接无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆