Bug 60428 - Webview Navigating returns lower case url
Summary: Webview Navigating returns lower case url
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-10-29 22:06 UTC by Shay
Modified: 2017-12-15 19:30 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Example project (126.90 KB, application/zip)
2017-10-30 03:00 UTC, Shay

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Shay 2017-10-29 22:06:06 UTC
I have a WebView controller in Xamarin Forms.
I am hooking its Navigating callback to catch javascript events.
The javascript is executing
but in Xamarin, I get WebNavigatingEventArgs arg.Url 
(i.e., all lower case).

This is critically wrong because there are instances when lower case/uppercase makes a huge difference
(e.g., trying to access youtube video by id after lower casing all characters doesn't work anymore).

Can you please confirm / propose a solution?
Comment 1 Paul DiPietro [MSFT] 2017-10-29 23:12:11 UTC
What platform is this occurring on?
Comment 2 Shay 2017-10-30 01:57:17 UTC
Confirmed also on Android M
Comment 3 Shay 2017-10-30 01:57:41 UTC
=== Visual Studio Community 2017 for Mac ===

Version 7.2 (build 636)
Installation UUID: 5a97e187-2c14-4d53-a54f-17a33ec3752e
	Mono (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.0
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Version: 2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.0.1 (13249)
Build 9A1004

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/shayo/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)
		7.0    (API level 24)
		7.1    (API level 25)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

Android Designer EPL code available here:

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Build Information ===

Release ID: 702000636
Git revision: b349c8fc0c2e1aab0179917d56eed75eb3a03337
Build date: 2017-10-06 15:20:04-04
Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 4 Paul DiPietro [MSFT] 2017-10-30 02:34:43 UTC
Does "also" mean it occurs on more than one of the platforms or is it only occurring on Android? Do you mind putting together a small reproduction that reproduces the issue if at all possible?
Comment 5 Shay 2017-10-30 03:00:54 UTC
Created attachment 25497 [details]
Example project
Comment 6 Shay 2017-10-30 03:02:08 UTC
The html page that is loading simply has
   <button onclick="window.location.href =  'https://THISisMixed.htm&Test=AbC'">Click me</button>

But the string that I get from webView is lowercase.

I suspect this is a OS dependent thing because when I open this in Chrome and click the button, it also says it can't find ... (in lower case).
Comment 7 Shay 2017-10-30 03:02:38 UTC
Perhaps there is another way to do this via JavaScript that preserves the url case?
Comment 8 Paul DiPietro [MSFT] 2017-12-15 19:30:43 UTC
For upkeep, as we are moving to GitHub issues (https://github.com/xamarin/Xamarin.Forms/issues), we will be closing as this does not appear to be a Forms issue on the surface, as we would not explicitly control browser behavior. Using the https://www.climbtag.com/bug.html page in a Chrome browser results in the same lower case url behavior.