File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/*
22Copyright 2015, 2016 OpenMarket Ltd
3+ Copyright 2018 New Vector Ltd
34
45Licensed under the Apache License, Version 2.0 (the "License");
56you may not use this file except in compliance with the License.
@@ -25,6 +26,7 @@ import { _t } from 'matrix-react-sdk/lib/languageHandler';
2526const Modal = require ( 'matrix-react-sdk/lib/Modal' ) ;
2627const Resend = require ( "matrix-react-sdk/lib/Resend" ) ;
2728import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore' ;
29+ import { isUrlPermitted } from 'matrix-react-sdk/lib/HtmlUtils' ;
2830
2931module . exports = React . createClass ( {
3032 displayName : 'MessageContextMenu' ,
@@ -275,7 +277,10 @@ module.exports = React.createClass({
275277 }
276278
277279 // Bridges can provide a 'external_url' to link back to the source.
278- if ( typeof ( this . props . mxEvent . event . content . external_url ) === "string" ) {
280+ if (
281+ typeof ( this . props . mxEvent . event . content . external_url ) === "string" &&
282+ isUrlPermitted ( this . props . mxEvent . event . content . external_url )
283+ ) {
279284 externalURLButton = (
280285 < div className = "mx_MessageContextMenu_field" >
281286 < a href = { this . props . mxEvent . event . content . external_url }
You can’t perform that action at this time.
0 commit comments