Skip to content

Commit

Permalink
Fix Windows issue with ampersand in the URLs
Browse files Browse the repository at this point in the history
close #9
close #12
  • Loading branch information
jakub-g committed Mar 23, 2015
1 parent b9d36d4 commit eec5065
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opener.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function opener(args, options, callback) {
//
// Furthermore, if "cmd /c" double-quoted the first parameter, then "start" will interpret it as a window title,
// so we need to add a dummy empty-string window title: http://stackoverflow.com/a/154090/3191
//
// Additionally, on Windows ampersand needs to be escaped when passed to "start"
args = args.map(function(value) {
return value.replace(/&/g, '^&');
});
args = ["/c", "start", '""'].concat(args);
}

Expand Down

0 comments on commit eec5065

Please sign in to comment.