diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt index ae0c0aabcc..7511eb5469 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/batch/print-notices.tt @@ -20,7 +20,11 @@ [% FOREACH message IN messages %]
-
[% message.content | $raw %]
+ [% IF ( message.is_html ) %] + [% message.content | $raw %] + [% ELSE %] +
[% message.content | $raw %]
+ [% END %]
[% END %] diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index c1c26ce627..d2bf8fc874 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -214,6 +214,12 @@ sub generate_html { C4::Templates::gettemplate( 'batch/print-notices.tt', 'intranet', CGI->new ); + foreach my $message (@{ $messages }) { + my $content_type = $message->{'content_type'} || 'text/plain; charset="UTF-8"'; + my $is_html = $content_type =~ m/html/io; + $message->{'is_html'} = $is_html; + } + $template->param( stylesheet => C4::Context->preference("NoticeCSS"), today => $today_syspref,