You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/12/14 19:13:28 UTC
docs commit: InAppBrowser - added a note to window.open to call
encodeURI on the url passed in (for URLs with Unicode chars)
Updated Branches:
refs/heads/master b31ddb2df -> cb480fc87
InAppBrowser - added a note to window.open to call encodeURI on the url passed in (for URLs with Unicode chars)
Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/cb480fc8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/cb480fc8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/cb480fc8
Branch: refs/heads/master
Commit: cb480fc87456a91882585411ea98441758e3735f
Parents: b31ddb2
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Dec 14 10:13:20 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Dec 14 10:13:20 2012 -0800
----------------------------------------------------------------------
docs/en/edge/cordova/inappbrowser/window.open.md | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/cb480fc8/docs/en/edge/cordova/inappbrowser/window.open.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/inappbrowser/window.open.md b/docs/en/edge/cordova/inappbrowser/window.open.md
index fe36860..48ee1ef 100644
--- a/docs/en/edge/cordova/inappbrowser/window.open.md
+++ b/docs/en/edge/cordova/inappbrowser/window.open.md
@@ -25,7 +25,7 @@ Opens a URL in a new InAppBrowser instance, the current browser instance, or the
var ref = window.open(url, target, options);
- __ref:__ reference to the InAppBrowser window (`InAppBrowser`)
-- __url:__ the URL to load (`String`)
+- __url:__ the URL to load (`String`). Call encodeURI() on this if you have Unicode characters in your URL.
- __target:__ the target to load the URL in (`String`) (Optional, Default: "_self")
_self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser
@@ -49,6 +49,7 @@ Quick Example
-------------
var ref = window.open('http://apache.org', '_blank', 'location=yes');
+ var ref2 = window.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
Full Example
------------
@@ -69,7 +70,7 @@ Full Example
//
function onDeviceReady() {
// external url
- var ref = window.open('http://apache.org', '_blank', 'location=yes');
+ var ref = window.open(encodeURI('http://apache.org'), '_blank', 'location=yes');
// relative document
ref = window.open('next.html', '_self');
}