# nsStdURL::ReplaceDotMess treats \ after # and ? incorrectly

VERIFIED FIXED in M14

P3
normal
VERIFIED FIXED
20 years ago
19 years ago

## Tracking

Trunk
M14
Points:
---
Dependency tree / graph

## Attachments

### (1 attachment)

 1.19 KB, patch Details | Diff | Splinter Review
(Reporter)

### Description

20 years ago
ReplaceDotMess() switches all \ to / in URL. This is wrong, it should not touch
them after # or ?.
(Reporter)

### Comment 1

20 years ago
Created attachment 1595 [details] [diff] [review]
Patch, do not touch stuff after delimiters ";?#"
(Reporter)

20 years ago
Blocks: 9184

### Updated

20 years ago
Target Milestone: M14

20 years ago
Blocks: 13449
(Reporter)

### Comment 2

20 years ago
After thinking more about this, I realized this could be a no-win situation.
Clearly, ReplaceDotMess() should fix the problems in any part of the URL that is
part of a file path/name. But it is impossible to tell for sure what is a path
and what is not.

Look at:

http://some.com/foo?\cgi-bin\myquery;par1\bar;"\*"

Quite obviously "\cgi-bin\myquery" is a path and conversion should happen. But
what about "par1\bar"? It could be a path or not. As to '"\*"', it looks like it
is just a string to be passed so we probably shouldn't touch it.

Should read the URL spec again to see if it has anything to say...

### Comment 3

20 years ago
I have a fix for this, waiting for review ... see bug 13311 ... it is part of a
bigger patch to solve some more URL parsing problems. As to the additional
comments, I think heikki is right, it is a no win situation. Using
ReplaceDotMess only on the path (everything before ;?#) seems to me is doing the
least damage.

### Comment 4

20 years ago
fix checked in ...

### Updated

20 years ago
QA Contact: paulmac → tever
(Assignee)

### Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

### Comment 5

20 years ago
thanks Andreas.

### Comment 6

19 years ago
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
(Reporter)

### Comment 7

19 years ago
Verified these in debugger, nsStdURL:GetSpec() with following URLs:

target.html?/1/3#/5/6
target.html?/1/3#/5/6/slot('?#/')
target.html?/1/3#/5/6/slot('\?#/')

All the member variables seem to hold correct values.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.