mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +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
e7962cfb4d
commit
e6879d5bbf
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>
|
2006-06-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSIndexPath.m:
|
* Source/NSIndexPath.m:
|
||||||
|
|
|
@ -518,7 +518,9 @@ static unsigned urlAlign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise by building a URL string from the supplied parameters
|
* 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
|
- (id) initWithScheme: (NSString*)aScheme
|
||||||
host: (NSString*)aHost
|
host: (NSString*)aHost
|
||||||
|
@ -526,6 +528,8 @@ static unsigned urlAlign;
|
||||||
{
|
{
|
||||||
NSString *aUrlString = [NSString alloc];
|
NSString *aUrlString = [NSString alloc];
|
||||||
|
|
||||||
|
aPath
|
||||||
|
= [aPath stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
|
||||||
if ([aHost length] > 0)
|
if ([aHost length] > 0)
|
||||||
{
|
{
|
||||||
if ([aPath length] > 0)
|
if ([aPath length] > 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue