Making the URLValueFormatter more resilient.
If the string value passed in the unformatValue is not one representing a valid url, now the URL init is not force unwrapped, so if it fails the code will not crash anymore. The scenario in with the URL creation fails is now managed.
Example input that makes the URLValueFormatter crash is "http://example.com/page1\"" (with an escaped quote at the end).
I also fixed some Swift 3 conversion to string warnings.
Making the URLValueFormatter more resilient. If the string value passed in the unformatValue is not one representing a valid url, now the URL init is not force unwrapped, so if it fails the code will not crash anymore. The scenario in with the URL creation fails is now managed. Example input that makes the URLValueFormatter crash is "http://example.com/page1\"" (with an escaped quote at the end).
I also fixed some Swift 3 conversion to string warnings.