[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #14 from Martin Renvoize (ashimema) 
 ---
Created attachment 183537
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183537&action=edit
Bug 40079: (follow-up) Improve test coverage and fix undef handling

This patch modernizes the Scrubber.t unit test with comprehensive
coverage following Koha best practices:

- Uses subtest structure for logical grouping
- Tests all scrubber types (default, comment, note)
- Includes security testing for XSS prevention
- Covers edge cases and error handling
- Tests new list elements added in previous commits

Also fixes C4::Scrubber to handle undef parameters cleanly by
treating them as 'default' type instead of generating warnings.

Test plan:
1. Run prove t/Scrubber.t
2. Verify all tests pass without warnings
3. Confirm comprehensive coverage of module functionality

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 QA Contact|[email protected] |[email protected]
   |y.org   |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #15 from Martin Renvoize (ashimema) 
 ---
Ooops.. seems I submitted the patch without ol.. my mistake, could have swarn
I'd added it.

Anyway, thanks or the testing and spotting that. I've corrected that inline and
I've also added a follow-up to add the definitions list options.. Finally I've
fixed the existing tests in one follow-up and then completely reworked them in
a second follow-up which drastically increases our coverage and spots an edge
case we hadn't found before which I've also fixed inline.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #13 from Martin Renvoize (ashimema) 
 ---
Created attachment 183536
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183536&action=edit
Bug 40079: (follow-up) Update unit test

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #12 from Martin Renvoize (ashimema) 
 ---
Created attachment 183535
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183535&action=edit
Bug 40079: (follow-up) Add dl, dt, dd tags to notes profile scrubber

Adds support for HTML description list elements (dl, dt, dd) to the
'note' profile in the HTML scrubber configuration. This allows
librarians to use description lists in note fields for better
structured content presentation.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-26 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #183014|0   |1
is obsolete||

--- Comment #11 from Martin Renvoize (ashimema) 
 ---
Created attachment 183534
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183534&action=edit
Bug 40079: Add ul/ol and li to allowed tags in notes profile

This patch add the unordered list, ordered list and list item html tags
to the list of allowed tags in C4::Scrubber.

Test plan:
1) Add a course reserve and include the following in the public note
   field:
   
 First item
 Second item
   
2) View the course details page and note "First item Second item" all
   appears on the same line (the ul and li tags have been stripped)
3) View the course reserves page and note the same issue in the public
   notes field of the table display
4) Apply this patch
5) Repeat 2 and 3 and note you now have a bullet pointed list displayed
   in both places
6) The display of the note on the details page may look mis-aligned..
   that will be dealt with on it's own bug

Signed-off-by: David Nind 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079
Bug 40079 depends on bug 36328, which changed state.

Bug 36328 Summary: C4::Scrubber should allow more HTML tags
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36328

   What|Removed |Added

 Status|Pushed to oldoldoldstable   |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

David Cook  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #10 from David Cook  ---
Actually, could we get the t/Scrubber.t updated too? It looks like there's an
existing test for the 'note' profile, although it's not a brilliant test. 

I'm also happy to do that if you don't want to. (Obviously the C4::Scrubber has
turned into a bit of a passion for me...)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

--- Comment #9 from David Nind  ---
(In reply to David Cook from comment #7)
> David: I don't the original description mentioned description lists per se?
> But I do see the patch says it adds "unordered list, ordered list and list
> item html tags", but it only adds "ul" and "li" - not "ol".

I meant the description in the commit message 8-).

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 40079] C4::Scrubber "note" profile should allow for list (ul/ol and li) HTML tags

2025-06-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40079

David Cook  changed:

   What|Removed |Added

Summary|C4::Scrubber should allow   |C4::Scrubber "note" profile
   |for list (ul/ol and li) |should allow for list
   |HTML tags   |(ul/ol and li) HTML tags

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/