mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 263185 - Make sure URL handling does not ignore the 4 known channel prefixes, even if the server trys to make us.
ChatZilla only. r=samuel p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch)
This commit is contained in:
parent
9c88d4e4a8
commit
c17ff01b97
@ -2206,8 +2206,11 @@ function cmdJoin(e)
|
||||
return chan;
|
||||
}
|
||||
|
||||
if (arrayIndexOf(e.server.channelTypes, e.channelName[0]) == -1)
|
||||
if ((arrayIndexOf(["#", "&", "+", "!"], e.channelName[0]) == -1) &&
|
||||
(arrayIndexOf(e.server.channelTypes, e.channelName[0]) == -1))
|
||||
{
|
||||
e.channelName = e.server.channelTypes[0] + e.channelName;
|
||||
}
|
||||
|
||||
var charset = e.charset ? e.charset : e.network.prefs["charset"];
|
||||
e.channel = e.server.addChannel(e.channelName, charset);
|
||||
|
@ -2196,8 +2196,11 @@ function gotoIRCURL (url)
|
||||
* NOTE: This is always a "#" so that URLs may be compared
|
||||
* properly without involving the server (e.g. off-line).
|
||||
*/
|
||||
if (arrayIndexOf(serv.channelTypes, target[0]) == -1)
|
||||
if ((arrayIndexOf(["#", "&", "+", "!"], target[0]) == -1) &&
|
||||
(arrayIndexOf(serv.channelTypes, target[0]) == -1))
|
||||
{
|
||||
target = "#" + target;
|
||||
}
|
||||
|
||||
var chan = new CIRCChannel(serv, null, target);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user