]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex/Fill.pm
CGI::Ex 2.22
[chaz/p5-CGI-Ex] / lib / CGI / Ex / Fill.pm
index 662c0d9a7ee823be96450a62aeb329d9bc559011..1bc90f31d5b55a0a08c7b514c71e24162c39d0d2 100644 (file)
@@ -7,7 +7,7 @@ CGI::Ex::Fill - Fast but compliant regex based form filler
 =cut
 
 ###----------------------------------------------------------------###
-#  Copyright 2006 - Paul Seamons                                     #
+#  Copyright 2007 - Paul Seamons                                     #
 #  Distributed under the Perl Artistic License without warranty      #
 ###----------------------------------------------------------------###
 
@@ -24,7 +24,7 @@ use vars qw($VERSION
 use base qw(Exporter);
 
 BEGIN {
-    $VERSION   = '2.00';
+    $VERSION   = '2.22';
     @EXPORT    = qw(form_fill);
     @EXPORT_OK = qw(fill form_fill html_escape get_tagval_by_key swap_tagval_by_key);
 };
@@ -185,7 +185,7 @@ sub fill {
     ### First pass
     ### swap <input > form elements if they have a name
     $$ref =~ s{
-        (<input \s (?: ([\"\'])(?:|.*?[^\\])\2 | [^>] )* >) # nested html ok
+        (<input \s (?: ([\"\'])(?:|.*?[^\\])\2 | [^>] )+ >) # nested html ok
         }{
             ### get the type and name - intentionally exlude names with nested "'
             my $tag   = $1;
@@ -249,7 +249,7 @@ sub fill {
         my $opts = substr($$ref, $start[$i], $close[$i] - $start[$i]);
         $opts =~ s{
             (<select \s                                 # opening
-             (?: "" | '' | ([\"\']).*?[^\\]\2 | [^>] )* # nested html ok
+             (?: "" | '' | ([\"\']).*?[^\\]\2 | [^>] )+ # nested html ok
              >)                                         # end of tag
             }{}sxi || next;
         next if ! $opts;
@@ -303,7 +303,7 @@ sub fill {
         my $oldval = substr($$ref, $start[$i] + $offset, $close[$i] - $start[$i]);
         $oldval =~ s{
             (<textarea \s                               # opening
-             (?: "" | '' | ([\"\']).*?[^\\]\2 | [^>] )* # nested html ok
+             (?: "" | '' | ([\"\']).*?[^\\]\2 | [^>] )+ # nested html ok
              >)                                         # end of tag
             }{}sxi || next;
         my $tag  = $1;
@@ -838,6 +838,6 @@ This module may distributed under the same terms as Perl itself.
 
 =head1 AUTHOR
 
-Paul Seamons
+Paul Seamons <perl at seamons dot com>
 
 =cut
This page took 0.032941 seconds and 4 git commands to generate.