mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-25 05:15:25 +00:00
Monotone-Parent: abba53838baf14abe32e7df33d5c776a643f81fe
Monotone-Revision: 20a6a2574e0eedce726bd938d931d3348cd6ec45 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-16T16:30:04 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2007-05-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.m ([NSString
|
||||
-_rangeOfURLInRange:refRange]): urls cannot end with "&" nor "=".
|
||||
There is no need to subscract the start from the length if a space
|
||||
is not found since the range has not changed either. Finally, the
|
||||
first character before the url might also be a tab or a cr, so we
|
||||
match it against the "urlAfterEndingChars" custom NSCharacterSet.
|
||||
|
||||
2007-05-15 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
|
||||
@@ -108,12 +108,12 @@ static NSMutableCharacterSet *urlAfterEndingChars = nil;
|
||||
- (NSRange) _rangeOfURLInRange: (NSRange) refRange
|
||||
{
|
||||
int start, length;
|
||||
NSRange endRange;
|
||||
NSRange workRange;
|
||||
|
||||
if (!urlNonEndingChars)
|
||||
{
|
||||
urlNonEndingChars = [NSMutableCharacterSet new];
|
||||
[urlNonEndingChars addCharactersInString: @",.:;\t \r\n"];
|
||||
[urlNonEndingChars addCharactersInString: @"&=,.:;\t \r\n"];
|
||||
}
|
||||
if (!urlAfterEndingChars)
|
||||
{
|
||||
@@ -123,16 +123,16 @@ static NSMutableCharacterSet *urlAfterEndingChars = nil;
|
||||
|
||||
start = refRange.location;
|
||||
while (start > -1
|
||||
&& [self characterAtIndex: start] != ' ')
|
||||
&& ![urlAfterEndingChars characterIsMember:
|
||||
[self characterAtIndex: start]])
|
||||
start--;
|
||||
start++;
|
||||
length = [self length] - start;
|
||||
endRange = NSMakeRange (start, length);
|
||||
endRange = [self rangeOfCharacterFromSet: urlAfterEndingChars
|
||||
options: NSLiteralSearch range: endRange];
|
||||
if (endRange.location != NSNotFound)
|
||||
length = endRange.location;
|
||||
length -= start;
|
||||
workRange = NSMakeRange (start, length);
|
||||
workRange = [self rangeOfCharacterFromSet: urlAfterEndingChars
|
||||
options: NSLiteralSearch range: workRange];
|
||||
if (workRange.location != NSNotFound)
|
||||
length = workRange.location - start;
|
||||
while
|
||||
(length > 0
|
||||
&& [urlNonEndingChars characterIsMember:
|
||||
|
||||
Reference in New Issue
Block a user