don't try to do preview URLs of matrix IDs (yet :D)

This commit is contained in:
Matthew Hodgson 2016-04-13 01:54:06 +01:00
parent 4b1ff51a42
commit 92f58b6927

View file

@ -84,7 +84,10 @@ module.exports = React.createClass({
findLink: function(nodes) {
for (var i = 0; i < nodes.length; i++) {
var node = nodes[i];
if (node.tagName === "A" && node.getAttribute("href")) {
if (node.tagName === "A" && node.getAttribute("href") &&
(node.getAttribute("href").startsWith("http://") ||
node.getAttribute("href").startsWith("https://")))
{
return node;
}
else if (node.children && node.children.length) {