mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 00:13:24 +00:00
merge of '40b7c19f2c07d8bd5fbb6e2cc45cba387e15d768'
and 'f542ae0ee839e825fc2f1dae6c5d916237edb3e4' Monotone-Parent: 40b7c19f2c07d8bd5fbb6e2cc45cba387e15d768 Monotone-Parent: f542ae0ee839e825fc2f1dae6c5d916237edb3e4 Monotone-Revision: d6ace8d3429bf9ad569fff969474bd5aa01214ae Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-06-01T14:30:06
This commit is contained in:
@@ -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>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartAlternativeViewer.m
|
||||
|
||||
@@ -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: ¤tUrlRange
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user