+2004-10-08 Helge Hess <helge.hess@opengroupware.org>
+
+ * FdExt.subproj/NSString+URLEscaping.m: do not escape URL safe chars
+ (fixes a WebDAV issue with Cadaver) (v4.3.121)
+
2004-10-04 Marcus Mueller <znek@mulle-kybernetik.com>
* NGExtensions.xcode: updated to the current build version
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
+// $Id: NSString+URLEscaping.m 1 2004-08-20 10:08:27Z znek $
#include "NSString+misc.h"
#include "common.h"
+/*
+ TODO: support new Panther API?:
+- (NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)e
+- (NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)e
+*/
+
@implementation NSString(URLEscaping)
static int useUTF8Encoding = -1;
}
static inline BOOL isToBeEscaped(unsigned char _c) {
- return (isUrlAlphaNum(_c) || (_c == '_')) ? NO : YES;
+ return (isUrlAlphaNum(_c) || (_c == '_') || isUrlSafeChar(_c)) ? NO : YES;
}
static void