From: Vlad Chernushevich Date: Tue, 18 Jun 2013 18:13:24 +0000 (+0200) Subject: Split message on all types of whitespaces. Revert previous fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1931864379e1920e8ec7cf4f89cef213674fa51c;p=KiwiIRC.git Split message on all types of whitespaces. Revert previous fix --- diff --git a/client/assets/src/views/controlbox.js b/client/assets/src/views/controlbox.js index 05c5ace..abb90c6 100644 --- a/client/assets/src/views/controlbox.js +++ b/client/assets/src/views/controlbox.js @@ -226,8 +226,8 @@ _kiwi.view.ControlBox = Backbone.View.extend({ // The default command if (command_raw[0] !== '/' || command_raw.substr(0, 2) === '//') { - // Remove any slash escaping at the start (ie. //), convert whitespaces to regular - command_raw = command_raw.replace(/^\/\//, '/').replace(/\s/, ' '); + // Remove any slash escaping at the start (ie. //) + command_raw = command_raw.replace(/^\/\//, '/'); // Prepend the default command command_raw = '/msg ' + _kiwi.app.panels().active.get('name') + ' ' + command_raw; @@ -240,7 +240,7 @@ _kiwi.view.ControlBox = Backbone.View.extend({ command_raw = this.preprocessor.process(command_raw); // Extract the command and parameters - params = command_raw.split(' '); + params = command_raw.split(/\s/); if (params[0][0] === '/') { command = params[0].substr(1).toLowerCase(); params = params.splice(1, params.length - 1); diff --git a/client/assets/src/views/panel.js b/client/assets/src/views/panel.js index 0ed3480..f02defd 100644 --- a/client/assets/src/views/panel.js +++ b/client/assets/src/views/panel.js @@ -82,7 +82,7 @@ _kiwi.view.Panel = Backbone.View.extend({ extra_html = _kiwi.view.MediaMessage.buildHtml(url); // Make the link clickable - return '' + nice + ' ' + extra_html; + return '' + nice + '' + extra_html; });