summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_comment.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/create_comment.jsx')
-rw-r--r--webapp/components/create_comment.jsx6
1 files changed, 5 insertions, 1 deletions
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) => {