mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Escape characters in path when building URL
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23036 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
087e9db5e6
commit
b2724f38c6
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-06-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURL.m: ([initWithScheme:host:path:]) escape characters in
|
||||
path as required.
|
||||
|
||||
2006-06-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSIndexPath.m:
|
||||
|
|
|
@ -518,7 +518,9 @@ static unsigned urlAlign;
|
|||
|
||||
/**
|
||||
* Initialise by building a URL string from the supplied parameters
|
||||
* and calling -initWithString:relativeToURL:
|
||||
* and calling -initWithString:relativeToURL:<br />
|
||||
* This method adds percent escapes to aPath if it contains characters
|
||||
* which need ascaping.
|
||||
*/
|
||||
- (id) initWithScheme: (NSString*)aScheme
|
||||
host: (NSString*)aHost
|
||||
|
@ -526,6 +528,8 @@ static unsigned urlAlign;
|
|||
{
|
||||
NSString *aUrlString = [NSString alloc];
|
||||
|
||||
aPath
|
||||
= [aPath stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
|
||||
if ([aHost length] > 0)
|
||||
{
|
||||
if ([aPath length] > 0)
|
||||
|
|
Loading…
Reference in a new issue