mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixed incorrect check if a url starts with an explicit protocol
This commit is contained in:
@@ -56,7 +56,7 @@ function autolinkUrls(text, tokens) {
|
||||
const linkText = match.getMatchedText();
|
||||
let url = linkText;
|
||||
|
||||
if (!url.lastIndexOf('http', 0) === 0) {
|
||||
if (url.lastIndexOf('http', 0) !== 0) {
|
||||
url = `http://${linkText}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user