try create uri

This commit is contained in:
Kyle Spearrin 2019-06-11 11:00:34 -04:00
parent 31a77a6e19
commit 8476f53337

View file

@ -91,7 +91,8 @@ namespace Bit.App.Services
public void LaunchUri(string uri, Dictionary<string, object> options = null) public void LaunchUri(string uri, Dictionary<string, object> options = null)
{ {
if(uri.StartsWith("http://") || uri.StartsWith("https://")) if((uri.StartsWith("http://") || uri.StartsWith("https://")) &&
Uri.TryCreate(uri, UriKind.Absolute, out var parsedUri))
{ {
Browser.OpenAsync(uri, BrowserLaunchMode.External); Browser.OpenAsync(uri, BrowserLaunchMode.External);
} }