From ea2405ab3a18954c3be35002938f2513d4c16120 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 22 Dec 2015 00:57:57 +0000 Subject: [PATCH] escape double-slash commands --- src/components/views/rooms/MessageComposer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 7c228b5c9d..67fb37d530 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -319,6 +319,9 @@ module.exports = React.createClass({ if (isEmote) { contentText = contentText.substring(4); } + else if (contentText[0] === '/') { + contentText = contentText.substring(1); + } var htmlText; if (this.markdownEnabled && (htmlText = mdownToHtml(contentText)) !== contentText) {