diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl
index 286b035372..2d0555750e 100755
--- a/misc/cronjobs/gather_print_notices.pl
+++ b/misc/cronjobs/gather_print_notices.pl
@@ -69,6 +69,14 @@ my $today = C4::Dates->new();
my @all_messages = @{ GetPrintMessages() };
exit unless (@all_messages);
+## carriage return replaced by
as output is html
+foreach my $message (@all_messages) {
+ local $_ = $message->{'content'};
+ s/\n/
/g;
+ s/\r//g;
+ $message->{'content'} = $_;
+}
+
my $OUTPUT;
if ($split) {