On Mon, 13 Nov 2006 10:02:25 +0100, Alexander Skwar
<[EMAIL PROTECTED]> wrote:

> The problem with that is, that openURL accepts two parameters and
> they are seperated with a ,. So it sees two parameters:
> http://www.spiegel.de/wirtschaft/0,1518,447923 and 00.html - 00.html
> is not a valid parameter, though. It should be something like
> new-window.

Btw, that's Mozilla bug #298960:
https://bugzilla.mozilla.org/show_bug.cgi?id=298960

> I now changed the /usr/bin/firefox script so, that it doesn't
> use mozilla-launcher anymore. Up to now, I can't find any problems.

The workaround i use here is to set MOZILLA_NEWTYPE=tab in my env, so
that the wrapper script always adds a "new-tab" parameter.

> Having had a closer "look" at this, I dislike this patch. Reason:
> Up to now firefox eventually runs the openURL remote command. Users
> might know this and might make use of this. So a user might call
> "firefox http://gentoo.org/,new-tab"; to have http://gentoo.org/
> opened in a new tab.

Imho, that a hack works at some point doesn't mean it is a supported
feature that devs should care about never breaking.

Though, an other reason for not accepting this patch is that some
websites may expect URL like this one, which relies on both encoded
and raw commas: http://foo.bar/param-1,param-2%2Cwith%2Ccommas,param-3 
Ok, it is not really likely, but i think it would be legal.

A different approach to fix this issue would be to exploits the fact
"openUrl(URL,anything)" (where "anything" is really anything, any
unknown argument, even an empty one) will actually open the "URL" in
either a tab or window depending on the user's prefs.  Thus, the
launcher script could add such a dummy argument when $MOZILLA_NEWTYPE
is not set.  But sure, it's a hack which may not work anymore in future
Firefox versions (i've not even tested it on 2.0 btw, i'm still using
1.5.something).

--
TGL.
-- 
gentoo-dev@gentoo.org mailing list

Reply via email to