Skip to content

Commit

Permalink
Add support for deep subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassnielsen committed Aug 5, 2014
1 parent 30ae0b5 commit 00d89a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/PAMWebBrowserViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ - (IBAction)go:(id)sender
else
{
NSError *error = [[NSError alloc] init];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})/?$" options:NSRegularExpressionCaseInsensitive error:&error];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^((\\S{1,61})\\.)+([a-z0-9-]{2,30})[\\?\\/]?\\S*$" options:NSRegularExpressionCaseInsensitive error:&error];
if ([[regex matchesInString:urlString options:0 range:NSMakeRange(0, urlString.length)] count] > 0)
{
#if DEBUG
Expand Down
2 changes: 1 addition & 1 deletion Example/webbrowser/PAMAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ @implementation PAMAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Override point for customization after application launch.
return YES;
}

Expand Down

0 comments on commit 00d89a5

Please sign in to comment.