diff --git a/src/skins/vector/views/molecules/MNoticeTile.js b/src/skins/vector/views/molecules/MNoticeTile.js index 9883e64bf5..c905d3be20 100644 --- a/src/skins/vector/views/molecules/MNoticeTile.js +++ b/src/skins/vector/views/molecules/MNoticeTile.js @@ -26,11 +26,13 @@ module.exports = React.createClass({ mixins: [MNoticeTileController], componentDidMount: function() { - HtmlUtils.highlightDom(this.getDOMNode()); + if (this.props.mxEvent.getContent().format === "org.matrix.custom.html") + HtmlUtils.highlightDom(this.getDOMNode()); }, componentDidUpdate: function() { - HtmlUtils.highlightDom(this.getDOMNode()); + if (this.props.mxEvent.getContent().format === "org.matrix.custom.html") + HtmlUtils.highlightDom(this.getDOMNode()); }, shouldComponentUpdate: function(nextProps) { diff --git a/src/skins/vector/views/molecules/MTextTile.js b/src/skins/vector/views/molecules/MTextTile.js index 06cc645ef4..8352ae5c5b 100644 --- a/src/skins/vector/views/molecules/MTextTile.js +++ b/src/skins/vector/views/molecules/MTextTile.js @@ -26,11 +26,13 @@ module.exports = React.createClass({ mixins: [MTextTileController], componentDidMount: function() { - HtmlUtils.highlightDom(this.getDOMNode()); + if (this.props.mxEvent.getContent().format === "org.matrix.custom.html") + HtmlUtils.highlightDom(this.getDOMNode()); }, componentDidUpdate: function() { - HtmlUtils.highlightDom(this.getDOMNode()); + if (this.props.mxEvent.getContent().format === "org.matrix.custom.html") + HtmlUtils.highlightDom(this.getDOMNode()); }, shouldComponentUpdate: function(nextProps) {