Skip to content

Commit

Permalink
Merge pull request #68 from kieykouch/master
Browse files Browse the repository at this point in the history
Encode URL
  • Loading branch information
EddyVerbruggen authored Nov 29, 2017
2 parents d8788ee + c6dad22 commit 26e7b1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ios/SafariViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ - (void) show:(CDVInvokedUrlCommand*)command {
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"url must start with http or https"] callbackId:command.callbackId];
return;
}
urlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *url = [NSURL URLWithString:urlString];
if (url == nil) {
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"bad url"] callbackId:command.callbackId];
Expand Down

0 comments on commit 26e7b1c

Please sign in to comment.