Closed
Bug 296824
Opened 20 years ago
Closed 20 years ago
root relative paths are missinterpreted (tested images and links)
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mariusnr, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 if there is an image on a page: <img src="/somepath/someimage.some_ext"> the image is not displayed. The Properties window shows that the image should be in <current_html_file_path>/relative_path. And the path's separators corresponding to the relative part are shown (in the Properties window) with %5C instead of / like: http://somesite/current_path%5Crelative_path_dir1%5Crelative_path_dir2%5Cimagefilename.some_ext But paths beginning with / are relative to the server root, those beginning with ./ are relative to the current html file path. I don't remember if, in the past, there were some missunderstandings about this and /path was interpreted as a ./ relative path. Other browsers have no problems. Here is a html test: <html> <head><title>TestPage</title> <body> This (html) file is located in e:\temp\www, or in /temp/www <br/> Do you see the image below? (Which is in e:\temp, or /temp) <br/> <img src="/temp/test.bmp"/> <br/> <a href="/temp/test1.html">Test link like the test image (located in e:\temp, or /temp)</a> </body> </html> Reproducible: Always Steps to Reproduce: 1.Visit/Make a page that has an image OR a link with src/href="/some(different)path_on_this_server/some_file.some_ext" 2. 3. Actual Results: The image is not found because the image address is miss-interpreted. The link is not followed because the link address is miss-interpreted. Expected Results: Interpret correctly the image/link address.
Comment 1•20 years ago
|
||
To my understanding, in the path part of a url the /'s should not be escaped, but I'm not sure how mozilla handles this. On the page given as the url for this bug, the escaping is done as %5c, which is the hex escape for a \ character, which are not correct in urls. This bug is probably just an alternate form of bug 64488.
Comment 2•20 years ago
|
||
The URl form the testcase is this : src="\technet\images\community\columns\cableguy\images\cg0605_01.jpg" a backslash is invalid in an URl and must be escaped but they want a "/" instead of a "\"
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 3•20 years ago
|
||
Well, i didn't check the code %5C to see what character it stands for, but I ran a test which I included in the description and I include it here again (I do not use backslashes (\) in the src or href attribute: <html> <head><title>TestPage</title> <body> This (html) file is located in e:\temp\www, or in (url path) /temp/www <br/> Do you see the image below? (Which is in e:\temp, or in (url path) /temp) <br/> <img src="/temp/test.bmp"/> <br/> <a href="/temp/test1.html">Test link like the test image (located in e:\temp, or /temp)</a> </body> </html> !! However, I tested also <img src="/E:/temp/test.bmp"/> which WORKS. So it is just a difference of interpretation: which is the root of the "server" on a local computer (file:// protocol). The root of the partition or MyComputer (the root of all partiotions). It is not a bug. I admitt. I was wrong. I even tested on a webserver and it works ok the root relative path. But for a Windows box... could it be a request? :D (Even if Microsoft intends to migrate Windows to the unique rooted file-system, as I heard) Thank you!
You need to log in
before you can comment on or make changes to this bug.
Description
•