mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-18 08:35:26 +08:00
linkify: update and do not add un-necessary http scheme
Change-Id: I7bd12dbc3bf512b3cd880892d2afda17c8117bd6 GitLab: #862
This commit is contained in:
@@ -10,8 +10,9 @@ function getPreviewInfo(messageId, url) {
|
||||
var title = null
|
||||
var description = null
|
||||
var image = null
|
||||
if (!url.includes("http://") && !url.includes("https://")) {
|
||||
url = "http://".concat(url)
|
||||
var u = new URL(url)
|
||||
if (u.protocol === '') {
|
||||
url = "https://".concat(url)
|
||||
}
|
||||
var domain = (new URL(url))
|
||||
fetch(url, {
|
||||
|
||||
Reference in New Issue
Block a user