Strip whitespace around url (bug 149082)

This commit is contained in:
pinkerton%netscape.com 2002-06-17 15:24:29 +00:00
Родитель 2fd744fdef
Коммит ae2d20be15
4 изменённых файлов: 28 добавлений и 12 удалений

Просмотреть файл

@ -585,10 +585,14 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item";
- (IBAction)goToLocationFromToolbarURLField:(id)sender
{
[self loadURL:[NSURL URLWithString:[sender stringValue]]];
// trim off any whitespace around url
NSMutableString *theURL = [[NSMutableString alloc] initWithString:[sender stringValue]];
CFStringTrimWhitespace((CFMutableStringRef)theURL);
[self loadURL:[NSURL URLWithString:theURL]];
[theURL release];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
}
- (void)saveDocument: (NSView*)aFilterView filterList: (NSPopUpButton*)aFilterList

Просмотреть файл

@ -585,10 +585,14 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item";
- (IBAction)goToLocationFromToolbarURLField:(id)sender
{
[self loadURL:[NSURL URLWithString:[sender stringValue]]];
// trim off any whitespace around url
NSMutableString *theURL = [[NSMutableString alloc] initWithString:[sender stringValue]];
CFStringTrimWhitespace((CFMutableStringRef)theURL);
[self loadURL:[NSURL URLWithString:theURL]];
[theURL release];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
}
- (void)saveDocument: (NSView*)aFilterView filterList: (NSPopUpButton*)aFilterList

Просмотреть файл

@ -585,10 +585,14 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item";
- (IBAction)goToLocationFromToolbarURLField:(id)sender
{
[self loadURL:[NSURL URLWithString:[sender stringValue]]];
// trim off any whitespace around url
NSMutableString *theURL = [[NSMutableString alloc] initWithString:[sender stringValue]];
CFStringTrimWhitespace((CFMutableStringRef)theURL);
[self loadURL:[NSURL URLWithString:theURL]];
[theURL release];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
}
- (void)saveDocument: (NSView*)aFilterView filterList: (NSPopUpButton*)aFilterList

Просмотреть файл

@ -585,10 +585,14 @@ static NSString *SearchToolbarItemIdentifier = @"Search Toolbar Item";
- (IBAction)goToLocationFromToolbarURLField:(id)sender
{
[self loadURL:[NSURL URLWithString:[sender stringValue]]];
// trim off any whitespace around url
NSMutableString *theURL = [[NSMutableString alloc] initWithString:[sender stringValue]];
CFStringTrimWhitespace((CFMutableStringRef)theURL);
[self loadURL:[NSURL URLWithString:theURL]];
[theURL release];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
// Focus and activate our content area.
[[mBrowserView getBrowserView] setActive: YES];
}
- (void)saveDocument: (NSView*)aFilterView filterList: (NSPopUpButton*)aFilterList