Bug 11529: Prevent too many spaces/break lines in the title tag

Caught by t/db_dependent/www/batch.t

Before this patch:
"""
<title>Koha &rsaquo; Catalog &rsaquo;

    Details for
    Bleak House /

</title>
"""

After this patch:
"""
<title>Koha &rsaquo; Catalog &rsaquo;

    Details for Bleak House /

</title>
"""

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-08-05 12:12:02 -05:00 committed by Martin Renvoize
parent 762a03fca1
commit cce433ba4c
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 20 additions and 20 deletions

View File

@ -1,21 +1,21 @@
[% IF ( biblio.title ) %]
[% biblio.title | html %]
[% ELSE %]
[%~ IF ( biblio.title ) ~%]
[%~ biblio.title | html ~%]
[%~ ELSE ~%]
No title
[% END %]
[% biblio.medium | html %]
[% FOREACH subtitle IN biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %]
[% subtitle | html %]
[% END %]
[% part_numbers = biblio.part_number.split(' \\| ') %]
[% part_names = biblio.part_name.split(' \\| ') %]
[% i = 0 %]
[% WHILE ( part_numbers.$i.defined || part_names.$i.defined ) %]
[% IF ( part_numbers.$i.defined ) %]
[% part_numbers.$i | html %]
[% END %]
[% IF ( part_names.$i.defined ) %]
[% part_names.$i | html %]
[% END %]
[% i = i + 1 %]
[% END %]
[%~ END ~%]
[%~ biblio.medium | html ~%]
[%~ FOREACH subtitle IN biblio.subtitle.split(' \| ') ~%][%~ IF Koha.Preference('marcflavour')=='UNIMARC' ~%],[%~ END ~%]
[%~ subtitle | html ~%]
[%~ END ~%]
[%~ part_numbers = biblio.part_number.split(' \\| ') ~%]
[%~ part_names = biblio.part_name.split(' \\| ') ~%]
[%~ i = 0 ~%]
[%~ WHILE ( part_numbers.$i.defined || part_names.$i.defined ) ~%]
[%~ IF ( part_numbers.$i.defined ) ~%]
[%~ part_numbers.$i | html ~%]
[%~ END ~%]
[%~ IF ( part_names.$i.defined ) ~%]
[%~ part_names.$i | html ~%]
[%~ END ~%]
[%~ i = i + 1 ~%]
[%~ END ~%]