Bug 40407: Remove legacy "pre-wrap" versions

From https://css-tricks.com/snippets/css/make-pre-text-wrap/

/* Browser specific (not valid) styles to make preformatted text wrap */

pre {
 white-space: pre-wrap;       /* css-3 */
 white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
 white-space: -pre-wrap;      /* Opera 4-6 */
 white-space: -o-pre-wrap;    /* Opera 7 */
 word-wrap: break-word;       /* Internet Explorer 5.5+ */
}

... I think it's now safe to remove the backward compatibility versions and simply keep pre-wrap.

Test plan (from bug 921)0:
  * place a hold on a title with a very very long title or author
  * mark it as "waiting for pickup" by doing a checkin
  * go to command line interface, and run
  * misc/cronjobs/gather_print_notices.pl /tmp
  * misc/cronjobs/printoverdues.sh /tmp
  * if your title/author is long enough, it's splitted on 2 lines
    with this patch (it is not before this patch)

It will also remove the warnings from t/db_dependent/Patron/Borrower_Discharge.t
WARNING: Ignored `white-space: -moz-pre-wrap` at 6:14, invalid value.
WARNING: Ignored `white-space: -o-pre-wrap` at 7:14, invalid value.
WARNING: Ignored `word-wrap: break-work` at 8:14, invalid value.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03cf21fd92)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7f05cfc408)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2025-07-16 12:19:44 +02:00 committed by Fridolin Somers
parent b81c5d6dee
commit 7eb5b8fcae
No known key found for this signature in database
GPG Key ID: 9A8E73E2A8B96537
2 changed files with 0 additions and 6 deletions

View File

@ -11,9 +11,6 @@
.message { page-break-after: always }
pre { font-family: monospace }
pre {white-space: pre-wrap;}
pre {white-space: -moz-pre-wrap;}
pre {white-space: -o-pre-wrap;}
pre {word-wrap: break-work;}
-->
</style>
[% IF ( stylesheet ) %]

View File

@ -999,9 +999,6 @@ sub _get_html_start {
<style type='text/css'>
pre {page-break-after: always;}
pre {white-space: pre-wrap;}
pre {white-space: -moz-pre-wrap;}
pre {white-space: -o-pre-wrap;}
pre {word-wrap: break-work;}
</style>
</head>
<body>";