Bug 42047 - Allow per-instance overrides for C4::Scrubber
Summary: Allow per-instance overrides for C4::Scrubber
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-10 03:44 UTC by David Cook
Modified: 2026-03-10 03:49 UTC (History)
0 users

See Also:
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 (2.32 KB, patch)
2026-03-10 03:49 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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"]