From d892f4f563a1c5bffc6a0940596fb83384ab8afb Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 4 Sep 2023 11:47:50 +0000 Subject: [PATCH] Bug 34704: Stop
tags being entered on every line in html letter templates This patch amends a regex check to stop
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/
/g' 4) Observe that the output has a
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
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
as output is html foreach my $message (@all_messages) { local $_ = $message->{'content'}; - s/\n/
/g; + s/^\s*\n/
/g; s/\r//g; $message->{'content'} = $_; } -- 2.37.1 (Apple Git-137.1)