Skip to content

Commit

Permalink
RFC 3986
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie-beck committed Mar 18, 2015
1 parent 9e5617e commit 7ba5e0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ exports.decode = function (str) {
}
};

exports.fixedEncodeURIComponent = function (str) {
// To be more stringent in adhering to RFC 3986

return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
return '%' + c.charCodeAt(0).toString(16);
});

};

exports.compact = function (obj, refs) {

Expand Down

0 comments on commit 7ba5e0f

Please sign in to comment.