KILabel icon indicating copy to clipboard operation
KILabel copied to clipboard

Missing Colon

Open RyPoints opened this issue 9 years ago • 2 comments

I have a link that is like https://www.site.com/java/Java.do

It displays correctly, but when I tap it it links to https//www.site.com/java/Java.do

This is the exact same link with a missing colon after the https. Any idea what could cause that and how to mend it?

RyPoints avatar Feb 29 '16 17:02 RyPoints

The link is correct here:

- (void)receivedActionForLinkType:(KILinkType)linkType string:(NSString*)string range:(NSRange)range
{
    NSLog(@"linkString: %@",string);

By the time it gets to Safari though, it is missing the colon.

RyPoints avatar Feb 29 '16 18:02 RyPoints

This functions as expected:

    case KILinkTypeURL:
        if (_urlLinkTapHandler)
        {   
            if ([string containsString:@"https://"]) {
                [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];
            } else {
                _urlLinkTapHandler(self, string, range);
            }
        }
        break;
    }

RyPoints avatar Feb 29 '16 18:02 RyPoints