Client: Escaping // at the start of an input message #123
authorDarren <darren@darrenwhitlen.com>
Thu, 8 Nov 2012 15:03:19 +0000 (15:03 +0000)
committerDarren <darren@darrenwhitlen.com>
Thu, 8 Nov 2012 15:03:19 +0000 (15:03 +0000)
client/assets/dev/view.js

index 0da683d24cad5f98c2493280329b73cad5d2833d..091669e814d106c2c1a685ffb82e56a3b68138aa 100644 (file)
@@ -838,7 +838,11 @@ _kiwi.view.ControlBox = Backbone.View.extend({
             pre_processed;\r
         \r
         // The default command\r
-        if (command_raw[0] !== '/') {\r
+        if (command_raw[0] !== '/' || command_raw.substr(0, 2) === '//') {\r
+            // Remove any slash escaping at the start (ie. //)\r
+            command_raw = command_raw.replace(/^\/\//, '/');\r
+\r
+            // Prepend the default command\r
             command_raw = '/msg ' + _kiwi.app.panels.active.get('name') + ' ' + command_raw;\r
         }\r
 \r