From 6c34bd677aceba8643aa7494681a364610427fae Mon Sep 17 00:00:00 2001 From: "nick.kreeger%park.edu" Date: Sat, 12 Aug 2006 18:24:07 +0000 Subject: [PATCH] Fixing bug 313027, can't drag plain text url to the tab bar. Patch by smfr, r=stuart.morgan, sr=pink --- camino/src/extensions/NSPasteboard+Utils.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/camino/src/extensions/NSPasteboard+Utils.mm b/camino/src/extensions/NSPasteboard+Utils.mm index d3797e7f031c..5e90fe2d0054 100644 --- a/camino/src/extensions/NSPasteboard+Utils.mm +++ b/camino/src/extensions/NSPasteboard+Utils.mm @@ -231,8 +231,10 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType"; return YES; if ([types containsObject:NSStringPboardType]) { + // NSURL will return nil for invalid url strings (containing spaces, returns etc), + // but will return a url otherwise. NSURL* testURL = [NSURL URLWithString:[self stringForType:NSStringPboardType]]; - return (testURL != nil) && ([[testURL scheme] length] > 0); + return (testURL != nil); } return NO;