Skip to content

Commit e7aaa38

Browse files
committed
Merge pull request jsonmodel#297 from scotbond/master
Safer transformation of NSURLFromNSString
2 parents ff121c9 + e798444 commit e7aaa38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

JSONModel/JSONModelTransformations/JSONValueTransformer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ -(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number
202202
#pragma mark - string <-> url
203203
-(NSURL*)NSURLFromNSString:(NSString*)string
204204
{
205-
return [NSURL URLWithString:string];
205+
return [NSURL URLWithString:[string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
206206
}
207207

208208
-(NSString*)JSONObjectFromNSURL:(NSURL*)url

0 commit comments

Comments
 (0)