Closed Bug 215862 Opened 21 years ago Closed 21 years ago

file://c:/test.txt works when typed into URL bar but not when used in <a href... statement

Categories

(Core Graveyard :: File Handling, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 122022

People

(Reporter: ron_davies, Assigned: law)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

If we type in file://c:/test.txt in the URL location bar and hit enter, the line
converts to file:///c:/test.txt and the file is displayed.......This is great
and what we expect.

However, when we use a tag like <a href="file://c:/test.txt">Test Link</a>
inside of a web-page, nothing happens when you click on it.   Nothing at all.  
If we right click on this link and choose "copy link location," then paste it
into the URL bar and hit enter, it works fine.

We can't figure out why we have the problem when we code it into the page.   

Any ideas?

Reproducible: Always

Steps to Reproduce:
1.make a file called test.txt and type something into it.... save it to the root
of your c: drive

2. Open Mozilla and type file://c:/test.txt into the URL....press enter.
THAT WILL WORK

3.  Now make a simple html page and put the following a href statement in.
<a href="file://c:/test.txt">Test Link</a> 

4.  Open that page in the browser and click on the link.
Nothing should happen.

Actual Results:  
Typing it in displayed the contents of the file.

clicking on a link did absolutely nothing.

Expected Results:  
displayed the file exactly as if it had been typed in.
This is bug 122022 (see also bug 84128)
Check your JavaScript Console (under Tools -> Web development) - there's a
security warning for this type of links.

*** This bug has been marked as a duplicate of 122022 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.