Skip to content

Commit 6722562

Browse files
author
Charlie Somerville
committed
call into URI::DEFAULT_PARSER directly
1 parent 9e9380b commit 6722562

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/oauth/helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def escape(value)
1515
end
1616

1717
def _escape(string)
18-
URI.escape(string, OAuth::RESERVED_CHARACTERS)
18+
URI::DEFAULT_PARSER.escape(string, OAuth::RESERVED_CHARACTERS)
1919
end
2020

2121
def unescape(value)
22-
URI.unescape(value.gsub('+', '%2B'))
22+
URI::DEFAULT_PARSER.unescape(value.gsub('+', '%2B'))
2323
end
2424

2525
# Generate a random key of up to +size+ bytes. The value returned is Base64 encoded with non-word

0 commit comments

Comments
 (0)