code: function uriEncodeString( text ){
      return encodeURIComponent(text).replace( /[\!\*\'\(\)]/g, function( chr ){
          chr = chr.charCodeAt(0).toString(16);
          while( chr.length < 2 ){
              chr = '0'+hex;
          }
          return '%'+chr;
      } )
  }
docs: OAuth safe encodeURIComponent of string
  handles ignored characters that OAuth expects encoded "! * ' ( )"