Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions KILabel/Source/KILabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,10 @@ + (NSString *)linkStringFromAttributedString:(NSAttributedString *)attrStr withR
{
// Check to see if there's a link attribute in the text, which will be our link text. If not
// we'll use the string in the raw text.
if (range.location == NSNotFound || range.location >= attrStr.length) {
return @"";
}

id realURL = [attrStr attribute:NSLinkAttributeName atIndex:range.location effectiveRange:nil];
if (realURL == nil)
{
Expand Down