mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
The site search prefix now checks for an actual URL (with the isurl sub).
Searching for multiple terms with the site specified is now possible.
This commit is contained in:
parent
638cce2d19
commit
8399b2caf2
@ -1032,7 +1032,12 @@ given, use the current one.
|
|||||||
# Google site search
|
# Google site search
|
||||||
if ($url =~ '^ss(| .*)$')
|
if ($url =~ '^ss(| .*)$')
|
||||||
{
|
{
|
||||||
my ($site, $search) = $url =~ /^ss\s(.*)\s(.*)/;
|
my ($site, $search) = $url =~ /^ss\s(\S+)\s(.*)/;
|
||||||
|
if (isurl($site) =~ 'false')
|
||||||
|
{
|
||||||
|
$search = $site . $search if $site;
|
||||||
|
$site = undef;
|
||||||
|
}
|
||||||
unless ($site and $search)
|
unless ($site and $search)
|
||||||
{
|
{
|
||||||
($search) = $url =~ /^ss\s(.*)/;
|
($search) = $url =~ /^ss\s(.*)/;
|
||||||
@ -1378,6 +1383,7 @@ Russ Rowan, Petr Baudis
|
|||||||
sub isurl
|
sub isurl
|
||||||
{
|
{
|
||||||
my ($url) = @_;
|
my ($url) = @_;
|
||||||
|
return 'false' if not $url;
|
||||||
opendir(DIR, '.');
|
opendir(DIR, '.');
|
||||||
my @files = readdir(DIR);
|
my @files = readdir(DIR);
|
||||||
closedir(DIR);
|
closedir(DIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user