From 4aa58376811f528bcae11f6b09b858e57a4ae0d9 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 1 Nov 2021 15:20:38 +0100 Subject: [PATCH] Fixed that if url starts with '//' then only 'https:' gets prepended not 'https://' --- .../kotlin/net/dankito/banking/util/BankIconFinder.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt index 4a92fcb3..0ae56e76 100644 --- a/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt +++ b/ui/BankingUiCommon/src/jvmMain/kotlin/net/dankito/banking/util/BankIconFinder.kt @@ -171,9 +171,10 @@ open class BankIconFinder : IBankIconFinder { if (urlEncoded.startsWith("http")) { return urlEncoded - } - else { - return "https://" + urlEncoded + } else if (urlEncoded.startsWith("//")) { + return "https:$urlEncoded" + } else { + return "https://$urlEncoded" } }