Fixed issue with channelnames with weird characters not working

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-26 14:48:03 +02:00
parent e5460bf605
commit d15c5c9e89
4 changed files with 28 additions and 28 deletions

View File

@@ -23,8 +23,8 @@ function password(inp, coll, guid, offline, socket) {
coll = inp.channel;
if(coll.length == 0) return;
coll = emojiStrip(coll).toLowerCase();
coll = coll.replace("_", "");
coll = encodeURIComponent(coll).replace(/\W/g, '');
coll = coll.replace(/_/g, "");
coll = filter.clean(coll);
} catch(e) {
return;
@@ -87,8 +87,8 @@ function conf_function(params, coll, guid, offline, socket) {
coll = params.channel.replace(/ /g,'');
if(coll.length == 0) return;
coll = emojiStrip(coll).toLowerCase();
coll = coll.replace("_", "");
coll = encodeURIComponent(coll).replace(/\W/g, '');
coll = coll.replace(/_/g, "");
coll = filter.clean(coll);
} catch(e) {
return;