From 865d6b8bc84099c2740805f72c4ffa18e27768ae Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 27 Jul 2020 16:37:33 -0400 Subject: [PATCH] ServerBrowser: strip trailing slashes from URL --- src/gui/Pages/AddAccount/ServerBrowser.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/Pages/AddAccount/ServerBrowser.qml b/src/gui/Pages/AddAccount/ServerBrowser.qml index 50bbd633..2c3a86e1 100644 --- a/src/gui/Pages/AddAccount/ServerBrowser.qml +++ b/src/gui/Pages/AddAccount/ServerBrowser.qml @@ -45,7 +45,7 @@ HBox { } acceptedUrl = url - acceptedUserUrl = args[0] + acceptedUserUrl = String(args[0]) loginFlows = flows accepted() @@ -143,7 +143,8 @@ HBox { Layout.fillWidth: true HTextField { - readonly property string cleanText: text.toLowerCase().trim() + readonly property string cleanText: + text.toLowerCase().trim().replace(/\/+$/, "") width: parent.width error: ! /https?:\/\/.+/.test(cleanText)