Bugzilla – Attachment 156229 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: Stop <br /> tags being entered on every line in html letter templates
Bug-34704-Stop-br--tags-being-entered-on-every-lin.patch (text/plain), 1.43 KB, created by
Matt Blenkinsop
on 2023-09-26 13:56:06 UTC
(
hide
)
Description:
Bug 34704: Stop <br /> tags being entered on every line in html letter templates
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-09-26 13:56:06 UTC
Size:
1.43 KB
patch
obsolete
>From d892f4f563a1c5bffc6a0940596fb83384ab8afb Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 4 Sep 2023 11:47:50 +0000 >Subject: [PATCH] Bug 34704: Stop <br /> tags being entered on every line in > html letter templates > >This patch amends a regex check to stop <br /> tags from being added to every line of html template > >Test plan: >1) This is easy to see using a regex checking tool. In your browser go to regex101.com >2) In the "Test string", copy and paste the text from the comment in the bug >3) In the regular expression field, enter 's/\n/<br \/>/g' >4) Observe that the output has a <br /> tag inserted after every html element and it is now one line of text >5) Replace the regular expression with '^\s*\n' >6) The output should now be formatted correctly with no <br /> tags >--- > misc/cronjobs/gather_print_notices.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl >index 9e4cd44f0a..b9f205c0f6 100755 >--- a/misc/cronjobs/gather_print_notices.pl >+++ b/misc/cronjobs/gather_print_notices.pl >@@ -109,7 +109,7 @@ if ( $html ) { > ## carriage return replaced by <br/> as output is html > foreach my $message (@all_messages) { > local $_ = $message->{'content'}; >- s/\n/<br \/>/g; >+ s/^\s*\n/<br \/>/g; > s/\r//g; > $message->{'content'} = $_; > } >-- >2.37.1 (Apple Git-137.1)
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