Open Bug 535845 Opened 15 years ago Updated 2 years ago

URL-encoded UTF-8 doesn't work on the commandline

Categories

(Firefox :: Shell Integration, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: zandr, Unassigned)

References

()

Details

URL shorteners are starting to use bizarre glyphs to get really short urls. In particular, tinyarro.ws seems to be gaining popularity.

Clicking on a link like this in Tweetie doesn't successfully open the URL. In fiddling with it a bit, it looks like Tweetie tries to open what I think is URL-encoded UTF-8. Firefox throws "Problem Loading Page" with the URL-encoded version in the error box, but the properly decoded URL in the address bar. Indeed, clicking in the address bar and hitting return opens the site successfully.

I tested this on the commandline with the same result.

For reference, Safari works, and clicking these links in Thunderbird works with Firefox (uses punycode instead?)
Here's an example tinyurl provided by http://➡.ws that I like to give to people, e.g. on twitter: http://➡.ws/zooko . If following that link works then you should end up at my blog.
NB: The links Zooko provides work fine if you click on them from within the browser. It's clicking on these links in other apps and expecting them to open in Firefox where things break down.

@gjmf also reported the problem coming from Echofon: http://twitter.com/gjmf/status/7685896641
If you leave a tab in the "Problem Loading Page" state and restart the browser, session restore doesn't decode the URL in the address bar.
This appears to have regressed in 4.0b1, now the address bar shows the URLencoded version as well.
To make the regression even more magical... In 4.0, you see the URLencoded version in the awesome bar. If you then type in a different address, visit that page, and hit 'Back', you the 3.6 behavior. At that point you'll have a properly decoded address in the awesome bar, but the error page. You can then hit return in the awesome bar to load the page.
Version: 3.5 Branch → Trunk
We're called out by name twice here: http://daringfireball.net/2010/09/starstruck
I don't think http://www.%e2%9e%a1.ws is a valid way to encode an IDN. This method of url encoding is only valid for the path part, not the hostname. The hostname should be in punycode when you need to sling URL around in byte form.

That said, we can't undo what those Mac apps are doing, and quite a few web apps out there also seem to get it wrong. Firefox should accept these.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.