From 890fd827d48a0e4cfa02dd025289d4c43568b505 Mon Sep 17 00:00:00 2001 From: cheekiatng Date: Wed, 22 Apr 2015 09:20:00 +0800 Subject: [PATCH] fix space in url issue --- iphone/Classes/TiUtils.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iphone/Classes/TiUtils.m b/iphone/Classes/TiUtils.m index 98e647a31af..7f6f708245f 100644 --- a/iphone/Classes/TiUtils.m +++ b/iphone/Classes/TiUtils.m @@ -1,6 +1,6 @@ /** * Appcelerator Titanium Mobile - * Copyright (c) 2009-2014 by Appcelerator, Inc. All Rights Reserved. + * Copyright (c) 2009-2015 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ @@ -795,7 +795,7 @@ +(NSURL*)toURL:(NSString *)relativeString relativeToURL:(NSURL *)rootPath } } - result = [NSURL URLWithString:relativeString relativeToURL:rootPath]; + result = [NSURL URLWithString:[relativeString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] relativeToURL:rootPath]; //TIMOB-18262 if (result && ([[result scheme] isEqualToString:@"file"])){