Index: branches/htmlform/cgi-bin/CommonWeb.pm
===================================================================
--- branches/htmlform/cgi-bin/CommonWeb.pm	(revision 446)
+++ branches/htmlform/cgi-bin/CommonWeb.pm	(revision 447)
@@ -16,36 +16,12 @@
 $VERSION     = 1.00;
 @ISA         = qw(Exporter);
-@EXPORT_OK      = qw(&parse_post &printFooter &printHeader &printError &printAndExit &desanitize &cleanInput &desanitize);
+@EXPORT_OK      = qw(&printFooter &printHeader &printError &printAndExit &desanitize &cleanInput &desanitize);
 
 @EXPORT      = (); #export nothing by default
-%EXPORT_TAGS = ( ALL => [qw( &parse_post &printFooter &printHeader &printError
+%EXPORT_TAGS = ( ALL => [qw( &printFooter &printHeader &printError
 				&printAndExit &desanitize &cleanInput )],
-                 lean    => [qw( &parse_post &printFooter &printHeader &printError
+                 lean    => [qw( &printFooter &printHeader &printError
 				&printAndExit &cleanInput )]
 		);
-
-sub parse_post {
-  my $buffer;
-  if ($ENV{'REQUEST_METHOD'} eq "GET") {
-    $buffer=$ENV{'QUERY_STRING'}
-  } elsif ($ENV{'REQUEST_METHOD'} eq 'POST' && $ENV{'CONTENT_TYPE'} eq "application/x-www-form-urlencoded") {
-    read(STDIN, $buffer, $ENV{CONTENT_LENGTH});
-  } else {
-    $buffer = $ENV{'QUERY_STRING'};
-    $buffer || read(STDIN, $buffer, $ENV{CONTENT_LENGTH});
-  }
-  my @pairs = split(/&/, $buffer);
-  my %webvarLocal;
-  foreach my $pair (@pairs) {
-    my ($name, $value) = split(/=/, $pair);
-    $name  =~ tr/+/ /;
-    $name  =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
-    $value =~ tr/+/ /;
-    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
-    $value =~ s/\'/\\\'/g;
-    $webvarLocal{$name} = $value;
-  }
-  return %webvarLocal;
-}
 
 
Index: branches/htmlform/cgi-bin/admin.cgi
===================================================================
--- branches/htmlform/cgi-bin/admin.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/admin.cgi	(revision 447)
@@ -15,4 +15,5 @@
 use warnings;
 use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use DBI;
 use CommonWeb qw(:ALL);
@@ -62,6 +63,12 @@
 }
 
-my %webvar = parse_post();
-cleanInput(\%webvar);
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
 
 print "Content-type: text/html\n\n".
Index: branches/htmlform/cgi-bin/main.cgi
===================================================================
--- branches/htmlform/cgi-bin/main.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/main.cgi	(revision 447)
@@ -12,4 +12,5 @@
 use warnings;	
 use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use DBI;
 use CommonWeb qw(:ALL);
@@ -55,7 +56,12 @@
 
 
-# Global variables
-my %webvar = parse_post();
-cleanInput(\%webvar);
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
 
 
Index: branches/htmlform/cgi-bin/newcity.cgi
===================================================================
--- branches/htmlform/cgi-bin/newcity.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/newcity.cgi	(revision 447)
@@ -13,4 +13,5 @@
 use warnings;
 #use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use DBI;
 use CommonWeb qw(:ALL);
@@ -35,6 +36,12 @@
 }
 
-my %webvar = parse_post();
-cleanInput(\%webvar);
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
 
 my ($dbh,$errstr) = connectDB_My;
Index: branches/htmlform/cgi-bin/newnode.cgi
===================================================================
--- branches/htmlform/cgi-bin/newnode.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/newnode.cgi	(revision 447)
@@ -13,4 +13,5 @@
 use warnings;
 #use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use DBI;
 use CommonWeb qw(:ALL);
@@ -34,6 +35,12 @@
 }
 
-my %webvar = parse_post();
-cleanInput(\%webvar);
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
 
 my ($dbh,$errstr) = connectDB_My;
Index: branches/htmlform/cgi-bin/search.cgi
===================================================================
--- branches/htmlform/cgi-bin/search.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/search.cgi	(revision 447)
@@ -14,4 +14,5 @@
 use warnings;	
 use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use DBI;
 use CommonWeb qw(:ALL);
@@ -52,6 +53,13 @@
 # Global variables
 my $RESULTS_PER_PAGE = 25;
-my %webvar = parse_post();
-cleanInput(\%webvar);
+
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
 
 if (defined($webvar{rpp})) {
Index: branches/htmlform/cgi-bin/snCalc.cgi
===================================================================
--- branches/htmlform/cgi-bin/snCalc.cgi	(revision 446)
+++ branches/htmlform/cgi-bin/snCalc.cgi	(revision 447)
@@ -4,4 +4,5 @@
 use warnings;	
 use CGI::Carp qw(fatalsToBrowser);
+use CGI::Simple;
 use NetAddr::IP;
 use CommonWeb qw(:ALL);;
@@ -9,5 +10,13 @@
 #file snCalc.cgi	little subnet calculator app
 
-my %webvar = parse_post();
+# Set up the CGI object...
+my $q = new CGI::Simple;
+# ... and get query-string params as well as POST params if necessary
+$q->parse_query_string;
+
+# Convenience;  saves changing all references to %webvar
+##fixme:  tweak for handling <select multiple='y' size=3> (list with multiple selection)
+my %webvar = $q->Vars;
+
 my $input;
 
