Koha/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title-head.inc
Jonathan Druart cce433ba4c
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>
2019-08-05 18:43:26 +01:00

21 lines
706 B
PHP

[%~ 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 ~%]