Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

GH-450 Browser - Fix for authority to make sure we get the port. #452

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Tests/Browser_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public async Task Open_Uri_Launch_NetStandard() =>

[Theory]
[InlineData("https://xamarin.com", "https://xamarin.com")]
[InlineData("https://xamarin.com/test.html", "https://xamarin.com/test.html")]
[InlineData("https://xamarin.com:56/test.html", "https://xamarin.com:56/test.html")]
[InlineData("http://xamarin.com", "http://xamarin.com")]
[InlineData("https://xamariñ.com", "https://xn--xamari-1wa.com")]
[InlineData("http://xamariñ.com", "http://xn--xamari-1wa.com")]
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.Essentials/Browser/Browser.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static Uri EscapeUri(Uri uri)
return uri;
#else
var idn = new System.Globalization.IdnMapping();
return new Uri(uri.Scheme + "://" + idn.GetAscii(uri.DnsSafeHost) + uri.PathAndQuery);
return new Uri(uri.Scheme + "://" + idn.GetAscii(uri.Authority) + uri.PathAndQuery);
#endif
}
}
Expand Down