mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Merge branch 'release-v0.13.5' into develop
This commit is contained in:
commit
d904212033
1 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2015, 2016 OpenMarket Ltd
|
Copyright 2015, 2016 OpenMarket Ltd
|
||||||
|
Copyright 2018 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -26,6 +27,7 @@ import Modal from 'matrix-react-sdk/lib/Modal';
|
||||||
import Resend from "matrix-react-sdk/lib/Resend";
|
import Resend from "matrix-react-sdk/lib/Resend";
|
||||||
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
|
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
|
||||||
import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to';
|
import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to';
|
||||||
|
import { isUrlPermitted } from 'matrix-react-sdk/lib/HtmlUtils';
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'MessageContextMenu',
|
displayName: 'MessageContextMenu',
|
||||||
|
@ -291,7 +293,10 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bridges can provide a 'external_url' to link back to the source.
|
// Bridges can provide a 'external_url' to link back to the source.
|
||||||
if (typeof(this.props.mxEvent.event.content.external_url) === "string") {
|
if (
|
||||||
|
typeof(this.props.mxEvent.event.content.external_url) === "string" &&
|
||||||
|
isUrlPermitted(this.props.mxEvent.event.content.external_url)
|
||||||
|
) {
|
||||||
externalURLButton = (
|
externalURLButton = (
|
||||||
<div className="mx_MessageContextMenu_field">
|
<div className="mx_MessageContextMenu_field">
|
||||||
<a href={this.props.mxEvent.event.content.external_url}
|
<a href={this.props.mxEvent.event.content.external_url}
|
||||||
|
|
Loading…
Reference in a new issue