Skip to content

Commit

Permalink
URI decode reference tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy authored Jun 20, 2018
1 parent 018e488 commit 79d784e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ api.escape = function escape (str) {
* @returns {string}
*/
api.unescape = function unescape (str) {
return str.replace(/~1/g, '/').replace(/~0/g, '~');
return decodeURIComponent(str.replace(/~1/g, '/').replace(/~0/g, '~'));
};

/**
Expand Down

0 comments on commit 79d784e

Please sign in to comment.