ServerBrowser: strip trailing slashes from URL
This commit is contained in:
parent
db5d9b57f8
commit
865d6b8bc8
|
@ -45,7 +45,7 @@ HBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptedUrl = url
|
acceptedUrl = url
|
||||||
acceptedUserUrl = args[0]
|
acceptedUserUrl = String(args[0])
|
||||||
loginFlows = flows
|
loginFlows = flows
|
||||||
accepted()
|
accepted()
|
||||||
|
|
||||||
|
@ -143,7 +143,8 @@ HBox {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
HTextField {
|
HTextField {
|
||||||
readonly property string cleanText: text.toLowerCase().trim()
|
readonly property string cleanText:
|
||||||
|
text.toLowerCase().trim().replace(/\/+$/, "")
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
error: ! /https?:\/\/.+/.test(cleanText)
|
error: ! /https?:\/\/.+/.test(cleanText)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user