- foreach my $required (qw(url)) {
- if (! length $config{$required}) {
- error(sprintf(gettext("Must specify %s when using the google search plugin"), $required));
- }
+ if (! length $config{url}) {
+ error(sprintf(gettext("Must specify %s when using the google search plugin"), "url"));
+ }
+ my $uri=URI->new($config{url});
+ if (! $uri || ! defined $uri->host) {
+ error(gettext("Failed to parse url, cannot determine domain name"));