Skip to content

Commit

Permalink
rawurlencode misencodes '~'.
Browse files Browse the repository at this point in the history
Thanks to samharnack for the fix
  • Loading branch information
jrconlin committed Jul 2, 2012
1 parent 52026ef commit db58c4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion php/OAuthSimple.php
Expand Up @@ -373,7 +373,9 @@ private static function _oauthEscape($string)
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);
Expand Down

0 comments on commit db58c4e

Please sign in to comment.