cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [01/11] git commit: [CB-4724] fixed UriFormatException
Date Thu, 05 Dec 2013 00:59:13 GMT
Updated Branches:
  refs/heads/master a8060219d -> 496ecc720


[CB-4724] fixed UriFormatException

fixed UriFormatException & InvalidOperationException


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/e5862bf8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/e5862bf8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/e5862bf8

Branch: refs/heads/master
Commit: e5862bf820b98bfebe8dfa737b6f6c89e3972172
Parents: d647f68
Author: Yangtb <yangtb@polyvi.com>
Authored: Wed Sep 11 16:18:47 2013 +0800
Committer: Yangtb <yangtb@polyvi.com>
Committed: Wed Sep 11 16:18:47 2013 +0800

----------------------------------------------------------------------
 src/wp/InAppBrowser.cs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/e5862bf8/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/src/wp/InAppBrowser.cs b/src/wp/InAppBrowser.cs
index 46e1384..007fd34 100644
--- a/src/wp/InAppBrowser.cs
+++ b/src/wp/InAppBrowser.cs
@@ -96,7 +96,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         private void ShowInAppBrowser(string url)
         {
-            Uri loc = new Uri(url);
+            Uri loc = new Uri(url, UriKind.RelativeOrAbsolute);
 
             Deployment.Current.Dispatcher.BeginInvoke(() =>
             {
@@ -251,7 +251,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
             }
 #endif
-            string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString
+ "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -259,7 +259,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs
e)
         {
-            string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.ERROR, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);
@@ -267,7 +267,7 @@ namespace WPCordovaClassLib.Cordova.Commands
 
         void browser_Navigating(object sender, NavigatingEventArgs e)
         {
-            string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.AbsoluteUri + "\"}";
+            string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString
+ "\"}";
             PluginResult result = new PluginResult(PluginResult.Status.OK, message);
             result.KeepCallback = true;
             this.DispatchCommandResult(result);


Mime
View raw message