Closed Bug 213857 Opened 21 years ago Closed 21 years ago

The specifier "#" in a filepath is erroneously translated to "%23"

Categories

(Core :: Networking, defect)

Sun
SunOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Ralf.Gerhauser, Assigned: darin.moz)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701

When using Mozilla as HTML file browser and a file path contains a "#", e.g.
to specify a chapter, the "#" is converted to "%23".

Reproducible: Always

Steps to Reproduce:
1.Use Mozilla with a file path argument or a remote command e.g.:
    mozilla /home/user/testpage.html#chapter1
  -or-
    mozilla -remote "openFile(/home/user/testpage.html#chapter1)"

2.When the "Alert" Box appears, click OK to continue

Actual Results:  
1.An "Alert" Box appears which shows the text:
    The file /home/user/testpage.html#chapter1
    cannot be found. Please check the location and try again.

2.After clicking OK within the Alert Box the Browser shows a wrong file path
  in its location bar ("#" was converted to "%23"):
    file:///home/user/testpage.html%23chapter1

Expected Results:  
The file path should be "file:///home/user/testpage.html#chapter1"
Attached file Simple HTML test page
Not file handling.....  Maybe uri fixup, maybe command line args, maybe networking.
Assignee: law → darin
Component: File Handling → Networking
QA Contact: petersen → benc
Is bug 122559 releated?
Maybe want to look at bugs 177964 and 180161
My guess: Make it a real file url (prepending file:///) should do the trick.
Otherwise the argument is taken as local filepath (which do *not* contain refs)
and to make it a valid file url (and to save the complete filename!) the # is
masked as %23 to not mistakenly detect it as the ref marker. Do not mix local
paths and file urls, if you want # to mark a ref then make it a full file-url.
CZ logging saves as e.g. moznet,%23evangelism.log instead of moznet,#evangelism.log
Prepending "file:///" as suggested by Andreas Otte works fine - Thanks!
marking invalid per user comment
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: