Split message on all types of whitespaces. Revert previous fix
authorVlad Chernushevich <mailbox@happytodesign.com>
Tue, 18 Jun 2013 18:13:24 +0000 (20:13 +0200)
committerVlad Chernushevich <mailbox@happytodesign.com>
Tue, 18 Jun 2013 18:13:24 +0000 (20:13 +0200)
client/assets/src/views/controlbox.js
client/assets/src/views/panel.js

index 05c5ace21ffd5c7e37b02661fa2eda520a51d5d5..abb90c612603b50628337f55364a2d5fadc4fd00 100644 (file)
@@ -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);
index 0ed348017eaf9767bc4a558db5f8ea9c41edddaa..f02defd9e797d472c26cf4dc0d0ba703363c4137 100644 (file)
@@ -82,7 +82,7 @@ _kiwi.view.Panel = Backbone.View.extend({
             extra_html = _kiwi.view.MediaMessage.buildHtml(url);
 
             // Make the link clickable
-            return '<a class="link_ext" target="_blank" rel="nofollow" href="' + url + '">' + nice + '</a> ' + extra_html;
+            return '<a class="link_ext" target="_blank" rel="nofollow" href="' + url + '">' + nice + '</a>' + extra_html;
         });