cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blankg <...@git.apache.org>
Subject [GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...
Date Wed, 01 Mar 2017 18:53:39 GMT
Github user blankg commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/175#discussion_r103760457
  
    --- Diff: src/ios/CDVFileTransfer.m ---
    @@ -440,13 +440,23 @@ - (void)download:(CDVInvokedUrlCommand*)command
             targetURL = [[self.commandDelegate getCommandInstance:@"File"] fileSystemURLforLocalPath:target].url;
         } else {
             targetURL = [NSURL URLWithString:target];
    +
    +        if (targetURL == nil) {
    +            NSString* targetUrlTextEscaped = [target stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    --- End diff --
    
    stringByAddingPercentEscapesUsingEncoding is deprecated, would be better to use [target
stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message