From 50b662040c5c2e2544b3517dc766f1837c7f05e1 Mon Sep 17 00:00:00 2001
From: "Jaehyun, Park" <kkamdooong@gmail.com>
Date: Thu, 29 Jun 2017 23:38:56 +0900
Subject: Add /help slash command (#6650)

* Add /help slash command

* Fix copyright year

* go fmt

* Add help command test at api4

* Fix jasonblais's issue

* Update test code

* Fix unit test issue - keep config unchanged
---
 webapp/components/create_comment.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'webapp/components/create_comment.jsx')

diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index 56e9eb88f..2ddc828cc 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -203,7 +203,11 @@ export default class CreateComment extends React.Component {
             (data) => {
                 this.setState({submitting: false});
                 if (data.goto_location && data.goto_location.length > 0) {
-                    browserHistory.push(data.goto_location);
+                    if (data.goto_location.startsWith('/') || data.goto_location.includes(window.location.hostname)) {
+                        browserHistory.push(data.goto_location);
+                    } else {
+                        window.open(data.goto_location);
+                    }
                 }
             },
             (err) => {
-- 
cgit v1.2.3-1-g7c22

