Don't extract strings in hidden values

This commit is contained in:
acli 2004-02-12 09:26:54 +00:00
parent 58951e551f
commit 2f928c4e75
1 changed files with 3 additions and 2 deletions

View File

@ -207,8 +207,9 @@ sub text_extract (*) {
for my $a ('alt', 'content', 'title', 'value') {
if ($attr->{$a}) {
next if $a eq 'content' && $tag ne 'meta';
next if $a eq 'value' && $tag ne 'input';
my($key, $val, $val_orig, $order) = @{$attr->{$a}};
next if $a eq 'value' && ($tag ne 'input'
|| (ref $attr->{'type'} && $attr->{'type'}->[1] eq 'hidden'));
my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
$val =~ s/\s+$//s;
$text{$val} = 1 if $val =~ /\S/s;
}