From 89a3c8078876076804702a18b17db64e06db59f6 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 8 May 2025 00:15:47 +0000 Subject: [PATCH] Bug 39860: Fix scrubbing and handling of HTML/TT in MARC21 xsl --- C4/XSLT.pm | 4 +- .../en/xslt/MARC21slim2intranetDetail.xsl | 40 +++++++++++++++++-- .../en/xslt/MARC21slim2intranetResults.xsl | 39 ++++++++++++++++-- 3 files changed, 74 insertions(+), 9 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 04dad6ca486..7d7cbfb8794 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -245,11 +245,11 @@ sub XSLTParse4Display { # Check if we should add extra content based on system preference if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { - my $scrubber = C4::Scrubber->new(); + my $scrubber = C4::Scrubber->new('staff'); my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); my $cleanxml = $scrubber->scrub($extracontentproccessed); - $extracontentxml = "" . $cleanxml . ""; + $extracontentxml = qq{$cleanxml}; } # embed variables diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index fb08b541114..f75b795604b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -14,7 +14,24 @@ - + + + + + + + + + + + + + + + + + + @@ -1568,10 +1585,25 @@ - - - + + + + + + + + + + + + + + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl index 36045762547..6742d00fd5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -12,6 +12,24 @@ + + + + + + + + + + + + + + + + + + @@ -1021,9 +1039,24 @@ - - - + + + + + + + + + + + + + + + + + + -- 2.39.5