Fix the regex matching invalid channel names

This commit is contained in:
calzoneman 2013-04-27 20:54:23 -05:00
parent 7c9d9c7ab1
commit fb702934f1

View file

@ -79,7 +79,7 @@ if(params["novideo"] != undefined) {
if(params["channel"] == undefined) {
// Match URLs of the form http://site.tld/r/channel
var loc = document.location+"";
var m = loc.match(/\/r\/([a-zA-Z0-9]+)/);
var m = loc.match(/\/r\/([a-zA-Z0-9]+)$/);
if(m) {
socket.emit("joinChannel", {
name: m[1]