From db58c4e4c3205a8be41756a43d66bfdf49ff7bf1 Mon Sep 17 00:00:00 2001 From: JR Conlin Date: Sun, 1 Jul 2012 17:53:52 -0700 Subject: [PATCH] rawurlencode misencodes '~'. Thanks to samharnack for the fix --- php/OAuthSimple.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/php/OAuthSimple.php b/php/OAuthSimple.php index 0f3671d..5212805 100644 --- a/php/OAuthSimple.php +++ b/php/OAuthSimple.php @@ -373,7 +373,9 @@ class OAuthSimple { throw new OAuthSimpleException('Array passed to _oauthEscape'); } $string = rawurlencode($string); - + + //FIX: rawurlencode of ~ + $string = str_replace('%7E','~', $string); $string = str_replace('+','%20',$string); $string = str_replace('!','%21',$string); $string = str_replace('*','%2A',$string);