Updated Branches: refs/heads/master 7e579165d -> f97d46166
Fixes CB-907 - Wrong URL encoding when downloading/uploading files from/to URLs with Unicode characters in the path Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/f97d4616 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/f97d4616 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/f97d4616 Branch: refs/heads/master Commit: f97d461661d51667dcd838740661657087b3ef20 Parents: 7e57916 Author: Shazron Abdullah <[email protected]> Authored: Fri Jun 15 12:37:11 2012 -0700 Committer: Shazron Abdullah <[email protected]> Committed: Fri Jun 15 12:37:11 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVFileTransfer.m | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/f97d4616/CordovaLib/Classes/CDVFileTransfer.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVFileTransfer.m b/CordovaLib/Classes/CDVFileTransfer.m index c584975..9a3ab53 100644 --- a/CordovaLib/Classes/CDVFileTransfer.m +++ b/CordovaLib/Classes/CDVFileTransfer.m @@ -51,7 +51,7 @@ file = [NSURL URLWithString:filePath]; } - NSURL *url = [NSURL URLWithString:server]; + NSURL *url = [NSURL URLWithString:[server stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; if (!url) { @@ -176,7 +176,7 @@ file = [NSURL URLWithString:filePath]; } - NSURL *url = [NSURL URLWithString:sourceUrl]; + NSURL *url = [NSURL URLWithString:[sourceUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; if (!url) { errorCode = INVALID_URL_ERR;
