Bugzilla – Attachment 158637 Details for
Bug 34704
Print templates are formatted incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34704: [Alternate] Remove regex for adding additional line breaks to print templates
Bug-34704-Alternate-Remove-regex-for-adding-additi.patch (text/plain), 1.96 KB, created by
Katrin Fischer
on 2023-11-07 22:39:32 UTC
(
hide
)
Description:
Bug 34704: [Alternate] Remove regex for adding additional line breaks to print templates
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-07 22:39:32 UTC
Size:
1.96 KB
patch
obsolete
>From a463c6e56b1f062d89ec7d017e39289d5b0f56cd Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 7 Nov 2023 22:31:31 +0000 >Subject: [PATCH] Bug 34704: [Alternate] Remove regex for adding additional > line breaks to print templates > >This makes sure that we don't change the line breaking for either >HTML nor plain text print notices. >For plain text, the <pre> is used to keep the line breaks as defined >in the notices template. >For HTML we require on the line breaks added by block elements in the >HTML notice, not adding any additional ones like before. >This gives the full control of the formatting to the notice editor. > >To test: >* Make sure your patron doesn't have an email address >* Make sure to check the hold filled notice in messaging preferences >* Place a old on any item >* Checkin the item >* Confirm hold >* Verify notices tab shows the Hold (print) notice >* ./misc/cronjobs/gather_print_notices.pl ./ --html >* Verify the generated file has the HTML output wrapped in pre. >* Reformat the HOLD print notice to be HTML by setting the checkbox. > Mmake sure to add some empty lines for (they should not print later) > and some <br>, <p>, <div> - They should be reflected in the notice later. >* Repeat test. >* All should be well :) >--- > misc/cronjobs/gather_print_notices.pl | 8 -------- > 1 file changed, 8 deletions(-) > >diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl >index 9e4cd44f0a..7df736354f 100755 >--- a/misc/cronjobs/gather_print_notices.pl >+++ b/misc/cronjobs/gather_print_notices.pl >@@ -106,14 +106,6 @@ $ods_filenames = print_notices({ > }) if $ods; > > if ( $html ) { >- ## carriage return replaced by <br/> as output is html >- foreach my $message (@all_messages) { >- local $_ = $message->{'content'}; >- s/\n/<br \/>/g; >- s/\r//g; >- $message->{'content'} = $_; >- } >- > $html_filenames = print_notices({ > messages => \@all_messages, > split => $split, >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34704
:
155196
|
155503
|
156229
|
156230
|
157303
|
158602
|
158603
|
158604
|
158637
|
158643