See Changelog.
Monotone-Parent: 2ddbb7513b1b8ba7d0d14c8cb60d801fac9314a6 Monotone-Revision: 1f2eaa372e3ae66a929fc22a568735d95ec1f67f Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-09-02T19:11:20 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
b7c9ebdd45
commit
428b086ff8
|
@ -1,3 +1,12 @@
|
|||
2010-09-02 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/generic.js (openMailTo): replaced calls to
|
||||
encodeURI by encodeURIComponent to make sure symbols such as '?'
|
||||
and '&' are encoded.
|
||||
|
||||
* SoObjects/SOGo/NSDictionary+URL.m (-asURLParameters): escaped
|
||||
keys and values using [NSString+misc stringByEscapingURL] from SOPE.
|
||||
|
||||
2010-09-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Tests/Unit/SOGoTest.m (-run): fixed build on GNUstep >= 1.20.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@
|
|||
- added support for Ctrl-C/Ctrl-V (copy/paste) in the calendar web module
|
||||
- now builds properly with gnustep-make 2.2 and above as well as gnustep-base
|
||||
1.20 and above
|
||||
- added return receipts support in the webmail interface
|
||||
|
||||
1.3-20100819 (1.3.1)
|
||||
--------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* NSDictionary+URL.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse inc.
|
||||
* Copyright (C) 2006-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
|
@ -24,6 +24,8 @@
|
|||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import "NSDictionary+URL.h"
|
||||
|
||||
@implementation NSDictionary (SOGoURLExtension)
|
||||
|
@ -32,10 +34,12 @@
|
|||
{
|
||||
NSMutableString *urlParameters;
|
||||
NSArray *keys;
|
||||
NSMutableArray *values;
|
||||
NSEnumerator *keysEnum;
|
||||
NSString *currentKey, *separator;
|
||||
NSString *currentKey, *separator ,*value;
|
||||
id currentValue;
|
||||
BOOL isFirst;
|
||||
unsigned int i;
|
||||
|
||||
urlParameters = [NSMutableString new];
|
||||
[urlParameters autorelease];
|
||||
|
@ -51,13 +55,22 @@
|
|||
currentValue = [self objectForKey: currentKey];
|
||||
if ([currentValue isKindOfClass: [NSArray class]])
|
||||
{
|
||||
values = [NSMutableArray array];
|
||||
separator = [NSString stringWithFormat: @"&%@=", currentKey];
|
||||
currentValue
|
||||
= [currentValue componentsJoinedByString: separator];
|
||||
for (i = 0; i < [currentValue count]; i++)
|
||||
{
|
||||
value = [currentValue objectAtIndex: i];
|
||||
value = [value stringByEscapingURL];
|
||||
[values addObject: value];
|
||||
}
|
||||
currentValue
|
||||
= [values componentsJoinedByString: separator];
|
||||
}
|
||||
else
|
||||
currentValue = [currentValue stringByEscapingURL];
|
||||
[urlParameters appendFormat: @"%@%@=%@",
|
||||
((isFirst) ? @"?" : @"&"),
|
||||
currentKey, currentValue];
|
||||
[currentKey stringByEscapingURL], currentValue];
|
||||
isFirst = NO;
|
||||
currentKey = [keysEnum nextObject];
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ function extractEmailName(mailTo) {
|
|||
|
||||
var tmpMailTo = mailTo.replace("<", "<");
|
||||
tmpMailTo = tmpMailTo.replace(">", ">");
|
||||
tmpMailTo = tmpMailTo.replace("&", "&");
|
||||
|
||||
var emailNamere = /([ ]+)?(.+)\ </;
|
||||
if (emailNamere.test(tmpMailTo)) {
|
||||
|
@ -218,8 +219,8 @@ function openMailTo(senderMailTo) {
|
|||
|
||||
if (mailto.length > 0)
|
||||
openMailComposeWindow(ApplicationBaseURL
|
||||
+ "../Mail/compose?mailto=" + encodeURI(mailto)
|
||||
+ ((subject.length > 0)?"?subject=" + encodeURI(subject):""));
|
||||
+ "../Mail/compose?mailto=" + encodeURIComponent(mailto)
|
||||
+ ((subject.length > 0)?"?subject=" + encodeURIComponent(subject):""));
|
||||
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue