You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
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