adium/adium

Parents 5253785a92a9
Children 551c610ece99
When scanning for links, the current location wasn't being updated before checking/creating a link leading to the next pass starting from before the last URL ended. This fixes #16217 and 16413.
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Thu Jun 20 11:21:59 2013 -0400
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Sat Jun 22 00:40:15 2013 -0400
@@ -32,7 +32,7 @@
#define ENC_INDEX_KEY @"encIndex"
#define ENC_CHAR_KEY @"encChar"
-#define MIN_LINK_LENGTH 0
+#define MIN_LINK_LENGTH 4
@interface AHHyperlinkScanner (PRIVATE)
- (AHMarkedHyperlink *)nextURIFromLocation:(unsigned long *)_scanLocation;
@@ -286,6 +286,9 @@
}else break;
}
+ // Update the scan location
+ m_scanLocation = scannedRange.location;
+
// if we have a valid URL then save the scanned string, and make a SHMarkedHyperlink out of it.
// this way, we can preserve things like the matched string (to be converted to a NSURL),
// parent string, its validation status (valid, file, degenerate, etc), and its range in the parent string