Bug 36328

Summary: C4::Scrubber should allow more HTML tags
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, martin.renvoize, wainuiwitikapark
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on:    
Bug Blocks: 19613    
Attachments: Bug 36328: Add p span div to Scrubber
Bug 36328: Add test
Bug 36328: Add a separate 'note' profile
Bug 36328: Add p span div to Scrubber
Bug 36328: Add test
Bug 36328: Add a separate 'note' profile
Bug 36328: Add p span div to Scrubber
Bug 36328: Add test
Bug 36328: Add a separate 'note' profile
Bug 36328: (QA follow-up) Expand tests and reorder elements to clarify differences

Description Jonathan Druart 2024-03-15 10:38:59 UTC
Should not we allow span, div, etc. as well as existing "br b i em big small strong"?
Comment 1 Jonathan Druart 2024-03-15 10:41:33 UTC
Created attachment 163192 [details] [review]
Bug 36328: Add p span div to Scrubber
Comment 2 Jonathan Druart 2024-03-15 10:41:36 UTC
Created attachment 163193 [details] [review]
Bug 36328: Add test
Comment 3 David Cook 2024-03-17 23:35:57 UTC
I think it probably makes sense to have a few different profiles. 

For the "comment" scrubber, we probably want to keep it fairly minimal I think.

Whereas "borrowernotes" and "opacnote" could have more elaborate structures. 

Bug 31934 has a profile with a fairly comprehensive list (although I wouldn't use it for "borrowernotes" or "opacnote"). 

I think an argument could be made for also including headings, table elements, fieldset/legend, ul/ol/li.
Comment 4 Martin Renvoize 2024-03-19 12:58:00 UTC
We could really do with getting bug 31934 moving again I think..
Comment 5 Jonathan Druart 2024-03-20 07:34:23 UTC
Created attachment 163497 [details] [review]
Bug 36328: Add a separate 'note' profile
Comment 6 Jonathan Druart 2024-03-20 07:34:50 UTC
Would this patch work for you? Here I am trying to tackle down bug 19613.
Comment 7 David Cook 2024-03-21 00:10:03 UTC
(In reply to Jonathan Druart from comment #6)
> Would this patch work for you? Here I am trying to tackle down bug 19613.

Looks good. I'll look at signing this off pronto...
Comment 8 David Cook 2024-03-21 00:42:35 UTC
Created attachment 163582 [details] [review]
Bug 36328: Add p span div to Scrubber

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 9 David Cook 2024-03-21 00:42:37 UTC
Created attachment 163583 [details] [review]
Bug 36328: Add test

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 10 David Cook 2024-03-21 00:42:40 UTC
Created attachment 163584 [details] [review]
Bug 36328: Add a separate 'note' profile

Signed-off-by: David Cook <dcook@prosentient.com.au>
Comment 11 Nick Clemens (kidclamp) 2024-04-01 16:11:39 UTC
Created attachment 164206 [details] [review]
Bug 36328: Add p span div to Scrubber

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens (kidclamp) 2024-04-01 16:11:41 UTC
Created attachment 164207 [details] [review]
Bug 36328: Add test

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Nick Clemens (kidclamp) 2024-04-01 16:11:43 UTC
Created attachment 164208 [details] [review]
Bug 36328: Add a separate 'note' profile

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 14 Nick Clemens (kidclamp) 2024-04-01 16:11:45 UTC
Created attachment 164209 [details] [review]
Bug 36328: (QA follow-up) Expand tests and reorder elements to clarify differences

Also tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 15 Katrin Fischer 2024-04-22 10:40:19 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 16 wainuiwitikapark 2024-04-24 01:50:44 UTC
Applied to 22.05.x