You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by blankg <gi...@git.apache.org> on 2017/03/01 18:53:39 UTC

[GitHub] cordova-plugin-file-transfer pull request #175: CB-10696 iOS: Encode target ...

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