https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42047 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 201394 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201394&action=edit 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) Test plan: 0. Do not apply the patch yet 1. Log into Koha, click on "Tools", click on "Record display customizations" 2. Click "New entry" 3. Add: - Display location: OPACDetailPage - Publication date: in the past - Appear in position: 1 - Defult > Title: test 4. In the Content field add: <p><strong>This is bold</strong></p> <p><em>This is italic</em></p> <div> <p>This is another paragraph with a div</p> </div> 5. Search the catalogue in the OAPC for "test" (or whatever you like) 6. Click on the title of the first result 7. Note under "OPAC view" there is all the HTML content that we added 8. Apply the patch 9. Create the /etc/koha/sites/kohadev/html_scrubber.yaml file with: record_display: allow: ["div"] 10. restart_all 11. Refresh the page 12. Note that that all the text appears but it is no longer styled 13. If you can view the source of the page, you'll notice that all the HTML we added was stripped out *except* the "div" element Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.