Bug 36845: Do not loop over the content attribute
We skip it. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commit68e317bd0f
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitaed7e08496
) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5a704197af
commit
ce48510c21
1 changed files with 2 additions and 3 deletions
|
@ -132,17 +132,16 @@ sub text_extract {
|
|||
# value [tag=input], meta
|
||||
my $tag;
|
||||
$tag = lc($1) if $t =~ /^<(\S+)/s;
|
||||
for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder', 'aria-label') {
|
||||
for my $a ('alt', 'title', 'value', 'label', 'placeholder', 'aria-label') {
|
||||
if ($attr->{$a}) {
|
||||
next if $a eq 'label' && $tag ne 'optgroup';
|
||||
next if $a eq 'content';
|
||||
next if $a eq 'value' && ($tag ne 'input'
|
||||
|| (ref $attr->{'type'} && $attr->{'type'}->[1] =~ /^(?:hidden|radio|checkbox)$/)); # FIXME
|
||||
next if $tag eq 'meta';
|
||||
my($key, $val, $val_orig, $order) = @{$attr->{$a}}; #FIXME
|
||||
$val = TmplTokenizer::trim($val);
|
||||
# for selected attributes replace '[%..%]' with '%s' globally
|
||||
if ( $a =~ /title|value|alt|content|placeholder|aria-label/ ) {
|
||||
if ( $a =~ /title|value|alt|placeholder|aria-label/ ) {
|
||||
$val =~ s/\[\%.*?\%\]/\%s/g;
|
||||
}
|
||||
# save attribute text for translation
|
||||
|
|
Loading…
Reference in a new issue