Closed Bug 417086 Opened 15 years ago Closed 15 years ago

Use of colon (:) in hash/anchor part of chrome URL when using results in an error.


(Firefox :: General, defect, P2)

Windows Vista



Firefox 3


(Reporter: karl, Assigned: dveditz)



(Keywords: fixed1.8.0.15, regression, verified1.8.1.13)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20071127 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20080201 Firefox/

If an add-on attempts to open a chrome URL in a new window and the hash part of the URL contains a colon character (:) then an error is throw and the window doesn't open

Reproducible: Always

Steps to Reproduce:
1.Open Error console
2.Enter "'chrome://mozapps/content/extensions/extensions.xul#a:')" in the Code textbox
3.Hit "Evaluate".
Actual Results:  
Error thrown
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) []"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::"chrome://mozapps/content/extensions/extensions.xul#a:") :: <TOP_LEVEL> :: line 1"  data: no]

Expected Results:  
A new window should open, displaying "chrome://mozapps/content/extensions/extensions.xul"

The fact that the anchor doesn't exist on the page (or is invalid) should not prevent the window from opening and the "chrome://mozapps/content/extensions/extensions.xul" page being displayed.

This bug is NOT PRESENT in firefox (or FF 3.0b2), only in (also FF 3.0b4pre)

bug #415367 ( (fixed?) is very similar, but only affects the query part of the URL.

If the URL is pasted into the address bar (and then [enter] hit) then nothing happens (no error is throw, but browser doesn't navigate to URL either). Is the error message suppressed?

If the colon (:) is removed from the URL (chrome://mozapps/content/extensions/extensions.xul#a) all works as expected.
Flags: blocking1.8.1.13?
Flags: blocking-firefox3?
Keywords: regression
Missed the ref in bug 415338, although this seems a very strange thing to do with chrome. I guess something like chrome help content could have anchors.
Assignee: nobody → dveditz
Blocks: 413250
Ever confirmed: true
Flags: wanted1.8.1.x+
Flags: blocking1.8.1.13?
Flags: blocking1.8.1.13+
Priority: -- → P2
Target Milestone: --- → Firefox 3 beta4
The reason for the error occured was because I was passing a URL to the chrome page when opening it (eg chrome://example/content/example.html#url=

I was using the anchor part of the URL to pass additional arguments to the page.
I really should have been using the query part of the URL. But was unsure how firefox would handle a chrome URL with a query string.


ISTR that the 1.8.0 Extension/Theme Manager used query strings to open in either Extension or Theme mode. You might look at that.
Or was that the 1.7 manager?
Flags: blocking-firefox3? → blocking-firefox3+
Attachment #302967 - Flags: superreview?(benjamin)
Attachment #302967 - Flags: review?(benjamin)
Attachment #302967 - Flags: superreview?(benjamin)
Attachment #302967 - Flags: superreview+
Attachment #302967 - Flags: review?(benjamin)
Attachment #302967 - Flags: review+
Target Milestone: Firefox 3 beta4 → Firefox 3
Comment on attachment 302967 [details] [diff] [review]
ignore chrome #ref as well

approved for, a=ss for release-drivers
Attachment #302967 - Flags: approval1.8.1.13+
Keywords: fixed1.8.1.13
Fix checked into trunk
Closed: 15 years ago
Resolution: --- → FIXED
Verified FIXED using Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/2008031114 Firefox/; see

Replacing fixed1.8.1.13 keyword with verified1.8.1.3
Attachment #302967 - Flags: approval1.8.0.15?
Flags: blocking1.8.0.15?
Flags: blocking1.8.0.15? → blocking1.8.0.15+
Comment on attachment 302967 [details] [diff] [review]
ignore chrome #ref as well

a=asac for
Attachment #302967 - Flags: approval1.8.0.15? → approval1.8.0.15+

Checking in chrome/src/nsChromeRegistry.cpp;
/cvsroot/mozilla/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.338.; previous revision: 1.338.
Checking in rdf/chrome/src/nsChromeRegistry.cpp;
/cvsroot/mozilla/rdf/chrome/src/nsChromeRegistry.cpp,v  <--  nsChromeRegistry.cpp
new revision: 1.323.10.5; previous revision: 1.323.10.4
Keywords: fixed1.8.0.15
You need to log in before you can comment on or make changes to this bug.