Skip to content

Commit

Permalink
* Add "default" option on CGI tag. Negligible impact on performance, as
Browse files Browse the repository at this point in the history
  branch only followed on blank/zero value.

* Close Issue #94 on Github.
  • Loading branch information
perusionmike committed Jul 7, 2016
1 parent 17c71e3 commit 12d5316
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/SystemTag/cgi.coretag
Expand Up @@ -24,6 +24,10 @@ sub {
$value =~ s~<([A-Za-z]*[^>]*\s+[Mm][Vv]\s*=\s*)~&lt;$1~g;
$value =~ s/\[/&#91;/g;
}
elsif(defined $opt->{default}) {
$value = $opt->{default};
}

if($opt->{filter}) {
$value = filter_value($opt->{filter}, $value, $var);
$CGI::values{$var} = $value unless $opt->{keep};
Expand Down

0 comments on commit 12d5316

Please sign in to comment.