summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 14:07:08 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 14:07:08 +0000
commitbcbba127d402ed9b28e212969d8eca5c020fa05e (patch)
tree1874ce1e54e3b4de7ef31934271157d9e1d683a8 /bin
parent662f8abfa580ebc5ea33367786d5a7f80ade6162 (diff)
downloaddrakguard-bcbba127d402ed9b28e212969d8eca5c020fa05e.tar
drakguard-bcbba127d402ed9b28e212969d8eca5c020fa05e.tar.gz
drakguard-bcbba127d402ed9b28e212969d8eca5c020fa05e.tar.bz2
drakguard-bcbba127d402ed9b28e212969d8eca5c020fa05e.tar.xz
drakguard-bcbba127d402ed9b28e212969d8eca5c020fa05e.zip
strip protocol when adding an url to blacklist/whitelist
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/drakguard b/bin/drakguard
index 78d34be..7489d63 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -164,7 +164,9 @@ gtkadd($w->{window},
0, gtknew('HBox', border_width => 5, spacing => 5, children_loose => [
$entry = gtknew('Entry'),
gtknew('Button', text => N("Add"), clicked => sub {
- list_add_addr($url_list->{list}, $entry->get_text);
+ my $text = $entry->get_text;
+ $text =~ s,^[^:]+://,,g; #- strip protocol
+ list_add_addr($url_list->{list}, $text);
$entry->set_text("");
}),
]),