element-hq / element-hq/element-ios
Adding a new directory throws error if there is trailling whitespace
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
**Describe the bug**
It is not possible to add a new network / directory, when there is whitespace in the entry from the _homeserver_ dialog - the app displays error _URL non gérée_ (my phone's in French - roughly translated to _unhandled URL_).
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '#' tab
2. Click on '#+'
3. Click on 'Switch'
4. Click on '+'
5. Type `libera.chat ` (note trailing space - in my case it was automatically added by autocorrect) and click OK
6. See error
**Expected behavior**
Trim leading/trailing whitespace to avoid such error
**Screenshots**
None
**Smartphone (please complete the following information):**
- Device: iPhone 6s
- OS: iOS 14.4.2
- Browser: N/A
- Version: 1.3.9
**Additional context**
As discussed in [Element IOS chat room](https://matrix.to/#/!pMBteVpcoJRdCJxDmn:matrix.org/$xlimts9PUc7YHmR9jftCf9P4YSdeLgARnCaJDwyn2M8?via=matrix.org&via=ergaster.org&via=librem.one)
Contributor guide
Assessment
This issue has not been assessed yet.