Bug 27691 - Allow HTML in notes for saved SQL reports
Summary: Allow HTML in notes for saved SQL reports
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-11 23:25 UTC by Lucas Gass (lukeg)
Modified: 2021-02-16 07:39 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 27691: Add $raw filter to report notes output (1.32 KB, patch)
2021-02-11 23:30 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 27691: Add $raw filter to report notes output (1.38 KB, patch)
2021-02-12 15:20 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 27691: Add $raw filter to report notes output (1.44 KB, patch)
2021-02-14 13:59 UTC, Katrin Fischer
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) 2021-02-11 23:25:41 UTC
Some reports have a long and detailed notes section pertaining to a given report. With the html filter it can be very difficult to parse out those notes. 

Is there any reason we cannot use a $raw filter in this situation?
Comment 1 Lucas Gass (lukeg) 2021-02-11 23:30:08 UTC
Created attachment 116783 [details] [review]
Bug 27691: Add $raw filter to report notes output

To test:
Add a report with some notes that include HTML: <p>TEST</p>
Run the report, the HTML displays literally
Apply patch
Run the report again. HTML looks good
Comment 2 ByWater Sandboxes 2021-02-12 15:20:03 UTC
Created attachment 116836 [details] [review]
Bug 27691: Add $raw filter to report notes output

To test:
Add a report with some notes that include HTML: <p>TEST</p>
Run the report, the HTML displays literally
Apply patch
Run the report again. HTML looks good

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Barbara Johnson 2021-02-12 15:20:44 UTC
The html looked great.  This is a big improvement.
Comment 4 Katrin Fischer 2021-02-14 13:59:47 UTC
Created attachment 116853 [details] [review]
Bug 27691: Add $raw filter to report notes output

To test:
Add a report with some notes that include HTML: <p>TEST</p>
Run the report, the HTML displays literally
Apply patch
Run the report again. HTML looks good

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-02-15 10:57:13 UTC
The problem is that this saved_sql.notes field can be filled in by Mana, so I don't think we can trust the data coming from there.

We should first make sure the data is sanitized before it is inserted into the Mana DB.
Comment 6 Katrin Fischer 2021-02-15 21:40:56 UTC
Is there a way we could remove HTML elements before uploading to Mana as a compromise? I believe the tagging feature does "scrubbing" of the input in a way, maybe that could be useful?
Comment 7 Jonathan Druart 2021-02-16 07:39:52 UTC
Yes, it's what I meant with "sanitized", HTML tags must be removed.