Bugzilla – Attachment 182058 Details for
Bug 39860
Add a system preference to allow for addtional/custom MARC fields in the record display
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39860: Use HTML scrubber to sanitize HTML
Bug-39860-Use-HTML-scrubber-to-sanitize-HTML.patch (text/plain), 1.32 KB, created by
Lucas Gass (lukeg)
on 2025-05-07 22:25:12 UTC
(
hide
)
Description:
Bug 39860: Use HTML scrubber to sanitize HTML
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-05-07 22:25:12 UTC
Size:
1.32 KB
patch
obsolete
>From 0dbea746d7effbe09a53c92f2faca3680e127c6b Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 7 May 2025 22:24:49 +0000 >Subject: [PATCH] Bug 39860: Use HTML scrubber to sanitize HTML > >--- > C4/XSLT.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 9f77968299b..04dad6ca486 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -33,6 +33,7 @@ use Koha::XSLT::Base; > use Koha::Libraries; > use Koha::Recalls; > use Koha::TemplateUtils qw( process_tt ); >+use C4::Scrubber; > > my $engine; #XSLT Handler object > >@@ -243,9 +244,12 @@ sub XSLTParse4Display { > > # Check if we should add extra content based on system preference > if ( C4::Context->preference('ExtraContentForXSLTDisplay') ) { >+ >+ my $scrubber = C4::Scrubber->new(); > my $extracontentvalue = C4::Context->preference('ExtraContentForXSLTDisplay'); > my $extracontentproccessed = process_tt( $extracontentvalue, { record => $record } ); >- $extracontentxml = "<extracontent><content>" . $extracontentproccessed . "</content></extracontent>"; >+ my $cleanxml = $scrubber->scrub($extracontentproccessed); >+ $extracontentxml = "<extracontent><content>" . $cleanxml . "</content></extracontent>"; > } > > # embed variables >-- >2.39.5
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 39860
:
182054
|
182055
|
182056
|
182057
|
182058
|
182059
|
182230
|
182231
|
182232
|
182233