Validate URL
Describe the bug Several bridges have a url input field. When a user inputs invalid contents (e.g. #2728 Context 3), this results in an error.
To Reproduce Steps to reproduce the behavior:
- Enter
://www.mydealz.de/diskussion/title-123into the third context of MydealsBridge
Expected behavior Observe well-formatted returnServerError. In addition to handling the exceptions, bridges like MydealsBridge should validate inputs (e.g. XenForoBridge).
Observed behavior

- Using latest master: bb6d553d
Additional context This problem still existed before #2692, though the Exception had a more complete message:
Could not get contents
cURL error: (3)
This particular problem with mydealsbridge is because there is an exception in the exception handling. I'm observing Protocol "" not supported or disabled in libcurl (1).
This issue touches on a lot of things at the same time. Since we don't have a url type for bridge forms, we must manually validate the input in each bridge.
Yes, I guess there are 2 issues here:
- Feature Request:
urltype for bridge parameters that validates the input - Bug: Exceptions should show returnServerError dialog
We have a low amount of url inputs so I suggest we don't introduce a new type. Manual validation in each bridge is fine.
What exactly is a returnServerError dialog? I think you mean better UX? Or maybe you mean that this error too shows up as an item in a feed?
A quick search shows about 20 bridges use url. I think we have url validation somewhere in core anyways so why would you be against making that available to bridges?
Yes, just better UX
It's a tradeoff. I prefer less code and simpler code. Not much value to be gained. I also think it takes an hour to implement correctly. Feel free to make a PR.
Wouldn't this equate to more code as each bridge implements the same validation?
Less code in the core.