Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Replace IsNewCortanaURI with IsNonAuthoritativeWithUrlQueryParameter
Browse files Browse the repository at this point in the history
Rewrite conditional to check that required url query parameter is
included, and
make it support other launch contexts with a generalized test for a non-
authoritative microsoft-edge: URI.
  • Loading branch information
da2x committed Jul 29, 2017
1 parent 1c42122 commit 459f257
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions EdgeDeflector/Program.cs
Expand Up @@ -121,9 +121,9 @@ static bool IsMsEdgeUri(string uri)
return uri.StartsWith("microsoft-edge:", StringComparison.OrdinalIgnoreCase) && !uri.Contains(" ");
}

static bool IsNewCortanaURI(string uri)
static bool IsNonAuthoritativeWithUrlQueryParameter(string uri)
{
return uri.Contains("launchContext1=Microsoft.Windows.Cortana");
return uri.Contains("microsoft-edge:?") && uri.Contains("&url=");
}

static string GetURIFromCortanaLink(string uri)
Expand Down Expand Up @@ -151,7 +151,7 @@ static string RewriteMsEdgeUriSchema(string uri)
}

// May be new-style Cortana URI - try and split out
if (IsNewCortanaURI(uri))
if (IsNonAuthoritativeWithUrlQueryParameter(uri))
{
string cortanaUri = GetURIFromCortanaLink(uri);
if (IsHttpUri(cortanaUri))
Expand Down
4 changes: 2 additions & 2 deletions EdgeDeflector/Properties/AssemblyInfo.cs
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]

0 comments on commit 459f257

Please sign in to comment.