See ChangeLog

Monotone-Parent: 6a6bbe9da76e6e30fd9ce63cf4a8c7677f5f61a0
Monotone-Revision: f542ae0ee839e825fc2f1dae6c5d916237edb3e4

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-06-01T14:29:30
This commit is contained in:
Francis Lachapelle
2012-06-01 14:29:30 +00:00
parent 9e842e7277
commit 2c9a61f0c5
2 changed files with 16 additions and 8 deletions
+8
View File
@@ -1,3 +1,11 @@
2012-06-01 Francis Lachapelle <flachapelle@inverse.ca>
* SoObjects/SOGo/NSString+Utilities.m
(-_handleURLs:textToMatch:prefix:inRanges:): don't reset the
prefix for the subsequent matching strings. This fixes links in
messages with multiple email addresses, some of which already
prefixed by "mailto;".
2012-06-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSString+Crypto.m
+8 -8
View File
@@ -215,13 +215,13 @@ static int cssEscapingCount;
{
rangePtr->location += offset;
urlText = [selfCopy substringFromRange: *rangePtr];
if ([urlText hasPrefix: prefix]) prefix = @"";
newUrlText = [NSString stringWithFormat: @"<a href=\"%@%@\">%@</a>",
prefix, urlText, urlText];
([urlText hasPrefix: prefix]? @"" : prefix),
urlText, urlText];
[selfCopy replaceCharactersInRange: *rangePtr
withString: newUrlText];
withString: newUrlText];
offset += ([newUrlText length] - [urlText length]);
// Add range for further substitutions
currentUrlRange = NSMakeRange (rangePtr->location, [newUrlText length]);
[ranges addNonNSObject: &currentUrlRange
@@ -240,12 +240,12 @@ static int cssEscapingCount;
selfCopy = [NSMutableString stringWithString: self];
[self _handleURLs: selfCopy
textToMatch: @"://"
prefix: @""
inRanges: ranges];
prefix: @""
inRanges: ranges];
[self _handleURLs: selfCopy
textToMatch: @"@"
prefix: @"mailto:"
inRanges: ranges];
prefix: @"mailto:"
inRanges: ranges];
[ranges freeNonNSObjects];
return selfCopy;