Skip to content

Commit

Permalink
Fix percent-encoding of submission data
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonJasonJason committed Mar 9, 2016
1 parent 5226979 commit 9a36dd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BVSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "BVSDK"
s.version = '3.1.0'
s.version = '3.1.1'
s.homepage = 'https://developer.bazaarvoice.com'
s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' }
s.author = { 'Bazaarvoice' => '[email protected]' }
Expand Down
4 changes: 2 additions & 2 deletions Pod/BVCommon/BVCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
/**
* Provides the master version of the SDK.
*/
#define BV_SDK_VERSION @"3.1.0"
#define BV_SDK_VERSION @"3.1.1"

// Conversation SDK Version
#define SDK_HEADER_NAME @"X-UA-BV-SDK"
#define SDK_HEADER_VALUE @"IOS_SDK_V310"
#define SDK_HEADER_VALUE @"IOS_SDK_V311"

/**
* Error domain for NSError results, when present.
Expand Down
7 changes: 4 additions & 3 deletions Pod/BVConversations/BVNetwork.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ - (void)addNthUrlParameterWithName:(NSString *)name value:(NSString *)value {
}

static NSString *urlEncode(id object) {

NSString *string = [NSString stringWithFormat: @"%@", object];

NSMutableCharacterSet *chars = NSCharacterSet.URLQueryAllowedCharacterSet.mutableCopy;
[chars removeCharactersInRange:NSMakeRange('&', 1)]; // %26
NSMutableCharacterSet *chars = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy];
[chars removeCharactersInString:@"+&"];
return [string stringByAddingPercentEncodingWithAllowedCharacters:chars];

}

-(NSString*) getParamsString {
Expand Down

0 comments on commit 9a36dd4

Please sign in to comment.