NSDataDetector with type NSTextCheckingTypeLink doesn't detect ".bo" TLD links

Originator:getaaron
Number:rdar://13916137 Date Originated:16-May-2013 04:05 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:6.1
Classification: Reproducible:Always
 
Summary:

Searching a string for links using an NSDataDetector with type NSTextCheckingTypeLink doesn't detect .bo links properly.

Steps to Reproduce:

    NSString *searchString = @"Tonight: Montgomery County Chapter Climate Change Action Planning Session. 7-9 pm 12712 Eldrid Place Silver Spring, MD 20904 OFA.BO/7Kqoqj";
    NSDataDetector *linkDetector = [NSDataDetector dataDetectorWithTypes:NSTextCheckingTypeLink error:nil];
    NSArray *matches = [linkDetector matchesInString:searchString options:0 range:NSMakeRange(0, searchString.length)];


Expected Results:

"matches" contains an NSTextCheckingResult of type NSTextCheckingTypeLink for the string "OFA.BO/7Kqoqj"

Actual Results:

Only two phone links are found:

(
<NSLinkCheckingResult: 0xbe921a0>{82, 5}{tel:12712},
<NSLinkCheckingResult: 0xbe63610>{119, 5}{tel:20904}
)

Regression:

Unknown

Notes:

For comparison, the URL detection logic in https://github.com/twitter/twitter-text-objc/blob/master/lib/TwitterText.m is able to successfully detect this link.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!