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

RESOLVED INVALID

Status

()

Core
Networking
RESOLVED INVALID
15 years ago
13 years ago

People

(Reporter: Ralf Gerhauser, Assigned: Darin Fisher)

Tracking

Trunk
Sun
SunOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
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"
(Reporter)

Comment 1

15 years ago
Created attachment 128499 [details]
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

Comment 3

15 years ago
Is bug 122559 releated?

Comment 4

15 years ago
Maybe want to look at bugs 177964 and 180161

Comment 5

15 years ago
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.

Comment 6

15 years ago
CZ logging saves as e.g. moznet,%23evangelism.log instead of moznet,#evangelism.log
(Reporter)

Comment 7

15 years ago
Prepending "file:///" as suggested by Andreas Otte works fine - Thanks!

Comment 8

15 years ago
marking invalid per user comment
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.