Index: trunk/uribl/uridb.cgi
===================================================================
--- trunk/uribl/uridb.cgi	(revision 89)
+++ trunk/uribl/uridb.cgi	(revision 90)
@@ -62,5 +62,7 @@
 $cfgname =~ s|_$||;
 
-my $uridb = new URIdb (configfile => "/etc/uridb/$cfgname.conf");
+my $uridb = new URIdb (configfile => "/etc/uridb/$cfgname.conf")
+	or die "urk:  something went wrong creating UIRdb\n";
+$uridb->connect;
 
 my $page;
@@ -96,7 +98,17 @@
   foreach my $domain (@dombase) {
     my %row;
+    # strip off URL protocol
+    $domain =~ s{^https?://}{};
+    # clean up/strip off extraneous bits from extract-data's tinydns output
     ($domain) = split /:/, $domain;
     $domain =~ s/^\+//;
-    $domain =~ s/\.uribl.company.com//;
+    $domain =~ s/\.$uridb->{misc}{blzone}//;
+    # and a secondary zone name Just In Case(TM)
+    $domain =~ s/\.$uridb->{misc}{altblzone}//;
+    # trim any non-FQDN URI parts
+    $domain =~ s{/.+$}{};
+    # QoL: allow just pasting an email address
+    $domain =~ s/[^@]+\@//;
+    $domain =~ s/\>.*$//;
     chomp $domain;
     # now, see if it's multilisted
