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 commit 68e317bd0f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b3dfb82bd0
commit
aed7e08496
|
|
@ -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 New Issue