Parameter key and value escaping needs to use the extended algorithm
from the OAuth specification, not the standard URI escaping algorithm
so we need to escape !, ', *, ( and ) characters.
ohauth.qsString = function(obj) {
return Object.keys(obj).sort().map(function(key) {
ohauth.qsString = function(obj) {
return Object.keys(obj).sort().map(function(key) {
- return encodeURIComponent(key) + '=' +
- encodeURIComponent(obj[key]);
+ return ohauth.percentEncode(key) + '=' +
+ ohauth.percentEncode(obj[key]);