Bugzilla – Attachment 189535 Details for
Bug 41053
Make notice contents searchable on notices tab of patron details
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41053: Move notice contents to hidden div
Bug-41053-Move-notice-contents-to-hidden-div.patch (text/plain), 2.68 KB, created by
Martin Renvoize (ashimema)
on 2025-11-13 09:25:46 UTC
(
hide
)
Description:
Bug 41053: Move notice contents to hidden div
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-13 09:25:46 UTC
Size:
2.68 KB
patch
obsolete
>From 29189bb77077348ee8df18408cf97fba5b105268 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 20 Oct 2025 10:58:58 +0200 >Subject: [PATCH] Bug 41053: Move notice contents to hidden div > >With thanks to Jonathan for suggesting this direction. > >Test plan: >Go to patron detail, notices tab for a patron with some notices. >Look for a string that only occurs in the notice text of some notice. >Without this patch, you should not find that one. >With this patch, you should find it. >Manipulate the text of a notice to check display of bad html. (Click title.) >* Like: update message_queue set content='<p>test</p><a href="' where message_id=X; > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../intranet-tmpl/prog/en/modules/members/notices.tt | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >index 0952e980573..4b59bec2721 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >@@ -16,11 +16,6 @@ > [% END %]</title > > > [% INCLUDE 'doc-head-close.inc' %] >-<style> >- .notice { >- display: none; >- } >-</style> > </head> > > <body id="pat_notices" class="pat"> >@@ -70,7 +65,7 @@ > href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&noticeid=[% QUEUED_MESSAGE.message_id | uri %]" > >[% QUEUED_MESSAGE.subject | html %]</a > > >- <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.html_content | html %]"></iframe> >+ <div style="display:none;" class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]">[% QUEUED_MESSAGE.html_content | html %]</div> > </td> > <td> > [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %] >@@ -195,7 +190,7 @@ > var noticeid = $(this).data("noticeid"); > > // Use shadow DOM for notice content preview >- var srcdoc = $("#notice" + noticeid).attr("srcdoc"); >+ var srcdoc = $("#notice" + noticeid).text(); > var shadowHost = document.createElement("div"); > var shadowRoot = shadowHost.attachShadow({ mode: "open" }); > shadowRoot.innerHTML = srcdoc; >-- >2.51.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41053
:
188143
|
188404
| 189535