Skip to content

Commit

Permalink
Adding en subdomain to Wikipedia links, so that they correctly resolv…
Browse files Browse the repository at this point in the history
…e on iOS devices
  • Loading branch information
mattt committed Dec 6, 2011
1 parent f41af67 commit af9f13f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -117,7 +117,7 @@ - (void)setSummaryText:(NSString *)text {

NSRegularExpression *regexp = NameRegularExpression();
NSRange linkRange = [regexp rangeOfFirstMatchInString:self.summaryText options:0 range:NSMakeRange(0, [self.summaryText length])];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://wikipedia.org/wiki/%@", [self.summaryText substringWithRange:linkRange]]];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://en.wikipedia.org/wiki/%@", [self.summaryText substringWithRange:linkRange]]];
[self.summaryLabel addLinkToURL:url withRange:linkRange];
}

Expand Down

0 comments on commit af9f13f

Please sign in to comment.