Bug 42047

Summary: Allow per-instance overrides for C4::Scrubber
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31934
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40087
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36328
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40717
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38498
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40078
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40077
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 42047: Override configuration using html_scrubber.yaml

Description David Cook 2026-03-10 03:44:01 UTC
Koha comes with a number of pre-defined C4::Scrubber profiles, but there are times where you might want to configure a different profile. Either for overriding built in profiles or for use with the Template::Toolkit scrubber filter.
Comment 1 David Cook 2026-03-10 03:49:19 UTC
Created attachment 195038 [details] [review]
Bug 42047: Override configuration using html_scrubber.yaml

This patch allows you to override any of the C4::Scrubber
settings using a file called "html_scrubber.yaml" which
is to be located in the same directory as your koha-conf.xml file.

This allows people to override existing configurations in
the event that they're not permissive enough (or are too permissive)

e.g. The following YAML placed at /etc/koha/sites/kohadev/html_scrubber.yaml
would make the additional_content scrubber only allow "div"
---
additional_content:
    allow: ["div"]