connect: Trim white space from user input fields (#4623)

Fixes: https://github.com/thelounge/thelounge/issues/4521
This commit is contained in:
Reto 2022-09-08 05:25:08 +02:00 committed by GitHub
parent 30e9f45fac
commit 0fa203569a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@
<label for="connect:name">Name</label> <label for="connect:name">Name</label>
<input <input
id="connect:name" id="connect:name"
v-model="defaults.name" v-model.trim="defaults.name"
class="input" class="input"
name="name" name="name"
maxlength="100" maxlength="100"
@ -35,7 +35,7 @@
<div class="input-wrap"> <div class="input-wrap">
<input <input
id="connect:host" id="connect:host"
v-model="defaults.host" v-model.trim="defaults.host"
class="input" class="input"
name="host" name="host"
aria-label="Server address" aria-label="Server address"
@ -122,7 +122,7 @@
<div class="input-wrap"> <div class="input-wrap">
<input <input
id="connect:proxyHost" id="connect:proxyHost"
v-model="defaults.proxyHost" v-model.trim="defaults.proxyHost"
class="input" class="input"
name="proxyHost" name="proxyHost"
aria-label="Proxy host" aria-label="Proxy host"
@ -147,7 +147,7 @@
<input <input
id="connect:proxyUsername" id="connect:proxyUsername"
ref="proxyUsernameInput" ref="proxyUsernameInput"
v-model="defaults.proxyUsername" v-model.trim="defaults.proxyUsername"
class="input username" class="input username"
name="proxyUsername" name="proxyUsername"
maxlength="100" maxlength="100"
@ -181,7 +181,7 @@
<label for="connect:name">Name</label> <label for="connect:name">Name</label>
<input <input
id="connect:name" id="connect:name"
v-model="defaults.name" v-model.trim="defaults.name"
class="input" class="input"
name="name" name="name"
maxlength="100" maxlength="100"
@ -226,7 +226,7 @@
<input <input
id="connect:username" id="connect:username"
ref="usernameInput" ref="usernameInput"
v-model="defaults.username" v-model.trim="defaults.username"
class="input username" class="input username"
name="username" name="username"
maxlength="100" maxlength="100"
@ -237,7 +237,7 @@
<label for="connect:realname">Real name</label> <label for="connect:realname">Real name</label>
<input <input
id="connect:realname" id="connect:realname"
v-model="defaults.realname" v-model.trim="defaults.realname"
class="input" class="input"
name="realname" name="realname"
maxlength="300" maxlength="300"
@ -247,7 +247,7 @@
<label for="connect:leaveMessage">Leave message</label> <label for="connect:leaveMessage">Leave message</label>
<input <input
id="connect:leaveMessage" id="connect:leaveMessage"
v-model="defaults.leaveMessage" v-model.trim="defaults.leaveMessage"
autocomplete="off" autocomplete="off"
class="input" class="input"
name="leaveMessage" name="leaveMessage"
@ -283,7 +283,7 @@ the server tab on new connection"
<label for="connect:channels">Channels</label> <label for="connect:channels">Channels</label>
<input <input
id="connect:channels" id="connect:channels"
v-model="defaults.join" v-model.trim="defaults.join"
class="input" class="input"
name="join" name="join"
/> />
@ -364,7 +364,7 @@ the server tab on new connection"
<label for="connect:username">Account</label> <label for="connect:username">Account</label>
<input <input
id="connect:saslAccount" id="connect:saslAccount"
v-model="defaults.saslAccount" v-model.trim="defaults.saslAccount"
class="input" class="input"
name="saslAccount" name="saslAccount"
maxlength="100" maxlength="100"