Skip to content

Commit

Permalink
Encode URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Ki Kouch committed Jun 16, 2017
1 parent 0cdd110 commit c6dad22
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 c6dad22

Please sign in to comment.