Bug 41086 - Add a helper method to C4/Scrubber to be able to pass allowed tags back to the template
Summary: Add a helper method to C4/Scrubber to be able to pass allowed tags back to th...
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 40659
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-23 13:52 UTC by Lucas Gass (lukeg)
Modified: 2025-10-24 03:17 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41086: Add way to get allowed tags from C4/Scrubber (3.13 KB, patch)
2025-10-23 21:12 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2025-10-23 13:52:10 UTC
With more scrubber profiles being setup it is important to pass the allowable tags/rules back to the user so they know what HTML they can use when content is scrubbed.
Comment 1 Lucas Gass (lukeg) 2025-10-23 21:12:02 UTC
Created attachment 188396 [details] [review]
Bug 41086: Add way to get allowed tags from C4/Scrubber
Comment 2 Lucas Gass (lukeg) 2025-10-23 21:12:55 UTC
needs units tests and better POD, but that is the idea :)
Comment 3 David Cook 2025-10-24 03:17:22 UTC
I think this could be a good start. Having a list of allowed tags would make a lot of sense.

Trickier with attributes especially if you're using "rules" or "default", although that's something that could be expanded over time. 

Cool idea I reckon!