mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-19 11:43:35 +00:00
Merge pull request #2 from w3irdrobot/trim-relay-input
Trim relay input before matching it against regex
This commit is contained in:
commit
b16d499581
@ -12,6 +12,7 @@
|
||||
|
||||
const submit = e => {
|
||||
e.preventDefault()
|
||||
url = url.trim()
|
||||
|
||||
if (!url.match(/^wss?:\/\/[\w.:-]+$/)) {
|
||||
return toast.show("error", 'That isn\'t a valid websocket url - relay urls should start with "wss://"')
|
||||
|
Loading…
Reference in New Issue
Block a user