Bug 23978: (QA follow-up) Use html_scrubber

This followup replaces the $raw filter with `scrub_html type => 'note' |
$raw`.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb19513f48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Martin Renvoize 2025-05-19 16:49:00 +01:00 committed by Paul Derscheid
parent 8690acce45
commit 8215156088
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 8 additions and 7 deletions

View File

@ -4,6 +4,7 @@
[% USE KohaDates %]
[% USE Koha %]
[% USE TablesSettings %]
[% USE HtmlScrubber %]
[% USE JSON.Escape %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
@ -849,7 +850,7 @@
<input type="hidden" name="reportname" value="[% reportname | html %]" />
<input type="hidden" name="group" value="[% group | html %]" />
<input type="hidden" name="subgroup" value="[% subgroup | html %]" />
<input type="hidden" name="notes" value="[% notes | $raw %]" />
<input type="hidden" name="notes" value="[% notes | scrub_html type => 'note' | $raw %]" />
<input type="hidden" name="cache_expiry" value="[% cache_expiry | html %]" />
<input type="hidden" name="cache_expiry_units" value="[% cache_expiry_units | html %]" />
<input type="hidden" name="public" value="[% public | html %]" />
@ -883,7 +884,7 @@
<input type="hidden" name="id" value="[% id | html %]" />
<h1>Enter parameters for report [% name | html %]:</h1>
[% IF ( notes ) %]
<p>[% notes | $raw %]</p>
<p>[% notes | scrub_html type => 'note' | $raw %]</p>
[% END %]
<fieldset class="rows">
<ol>
@ -943,7 +944,7 @@
>
<div class="page-section">
[% IF ( notes ) %]
<p><span class="label">Notes:</span> [% notes | $raw %]</p>
<p><span class="label">Notes:</span> [% notes | scrub_html type => 'note' | $raw %]</p>
[% END %]
[% IF ( unlimited_total ) %]
<p>
@ -1415,7 +1416,7 @@
[% END # /IF (usecache) %]
<li>
<label for="notes">Notes:</label>
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | $raw %]</textarea>
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | scrub_html type => 'note' | $raw %]</textarea>
</li>
</ol>
</fieldset>
@ -1445,7 +1446,7 @@
[% IF saved_results %]
<h1>Saved report results</h1>
<h2>[% name | html %]</h2>
<p>[% notes | $raw %]</p>
<p>[% notes | scrub_html type => 'note' | $raw %]</p>
<table>
[% FOREACH rows IN saved_results %]
<tr>
@ -1465,7 +1466,7 @@
[% IF ( notes ) %]
<li>
<span class="label">Notes:</span>
[% notes | $raw %]
[% notes | scrub_html type => 'note' | $raw %]
</li>
[% ELSE %]
@ -1533,7 +1534,7 @@
[% END %]
<li>
<label for="notes">Notes:</label>
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | $raw %]</textarea>
<textarea id="notes" name="notes" cols="50" rows="2">[% notes | scrub_html type => 'note' | $raw %]</textarea>
</li>
</ol>
</fieldset>