fix url previews firing incorrectly on Matrix.org
This commit is contained in:
@@ -117,7 +117,7 @@ module.exports = React.createClass({
|
|||||||
else {
|
else {
|
||||||
var url = node.getAttribute("href");
|
var url = node.getAttribute("href");
|
||||||
var host = url.match(/^https?:\/\/(.*?)(\/|$)/)[1];
|
var host = url.match(/^https?:\/\/(.*?)(\/|$)/)[1];
|
||||||
if (node.textContent.trim().startsWith(host)) {
|
if (node.textContent.toLowerCase().trim().startsWith(host.toLowerCase())) {
|
||||||
// it's a "foo.pl" style link
|
// it's a "foo.pl" style link
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user