Skip to content

Commit

Permalink
use sanitizeURL for url values in searchableItemAttributeSet
Browse files Browse the repository at this point in the history
  • Loading branch information
cheekiatng committed Aug 31, 2015
1 parent 71e6649 commit 2fad60f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iphone/Classes/TiAppiOSSearchableItemAttributeSetProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ -(void)applyLoadTimeProperties:(NSDictionary*)props
[_attributes setValue:[TiUtils dateForUTCDate:object] forKey:key];
}else if([urlFieldTypes containsObject:key]){
//Use URL logic to add
[_attributes setValue:[NSURL URLWithString:[object stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] forKey:key];
[_attributes setValue:[self sanitizeURL:object] forKey:key];
}else{
[_attributes setValue:object forKey:key];
}
Expand Down Expand Up @@ -122,7 +122,7 @@ -(void)setContentURL:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setContentURL,value);
_attributes.contentURL =[NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.contentURL = [self sanitizeURL:value];
}

//Optional file URL pointing to a thumbnail image for this item
Expand All @@ -135,7 +135,7 @@ -(void)setThumbnailURL:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setThumbnailURL,value);
_attributes.thumbnailURL = [NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.thumbnailURL = [self sanitizeURL:value];
}

//Optional image data for thumbnail for this item
Expand Down Expand Up @@ -1316,7 +1316,7 @@ -(void)setUrl:(id)value
{
ENSURE_SINGLE_ARG(value,NSString);
ENSURE_UI_THREAD(setUrl,value);
_attributes.URL = [NSURL URLWithString:[value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
_attributes.URL = [self sanitizeURL:value];;
}

@end
Expand Down

0 comments on commit 2fad60f

Please sign in to comment.