Skip to content

Commit

Permalink
Use encodeURIComponent instead of queryString.escape to work with
Browse files Browse the repository at this point in the history
browserify
See:
Gozala/querystring#7
  • Loading branch information
balu committed Jan 1, 2017
1 parent 1a2813a commit c1c347c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
return (username && username.length > 0) ?
url.replace(
/(https?:\/\/)/i,
"$1" + queryString.escape(username) + ":" + queryString.escape(password) + "@"
"$1" + encodeURIComponent(username) + ":" + encodeURIComponent(password) + "@"
) : url;
},

Expand Down

0 comments on commit c1c347c

Please sign in to comment.