| Summary: | Broken HTML showing in Alert 'subscriptions' tab | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
| Component: | OPAC | Assignee: | Owen Leonard <oleonard> |
| Status: | Pushed to stable --- | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, ludovic.julien, noah.tremblay, paul.derscheid |
| Version: | Main | Keywords: | additional_work_needed |
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: |
25.11.00,25.05.04
|
|
| Circulation function: | |||
| Attachments: |
Bug 40602: Broken HTML showing in Alert 'subscriptions' tab
Bug 40602: Broken HTML showing in Alert 'subscriptions' tab Bug 40602: Broken HTML showing in Alert 'subscriptions' tab Bug 40602: Broken HTML showing in Alert 'subscriptions' tab |
||
|
Description
Katrin Fischer
2025-08-06 11:15:11 UTC
In order to reproduce this:
Make sure you are testing with a user, that has a salutation, surname and firstname set.
The problem is patroninfo creating HTML tags even with the no_html flag set it looks like:
<form action="/cgi-bin/koha/opac-alert-subscribe.pl" method="post" class="unsubscribe" data-title="[% sub.biblio.title | html %] [% sub.biblio.subtitle | html %]" data-patron="[% INCLUDE 'patron-title.inc' no_html=1 patron=logged_in_user%]">
Generates:
<form action="/cgi-bin/koha/opac-alert-subscribe.pl" method="post" class="unsubscribe" data-title="Kölner Zeitschrift für Soziologie und Sozialpsychologie, " data-patron=" <span class="patron-title">Frau</span> Karin Mustermann">
... Which is invalid because of the "" and also there should be NO HTML tags.
Hm, OK; there is no no_html flag for patron_title.inc in the OPAC: https://git.koha-community.org/Koha-community/Koha/src/commit/5832521086b06c2221474791278ebd9b5bdb4049/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc I've temporarily switched to [% logged_in_user.firstname %] [% logged_in_user.surname %] which seems to avoid the issue for now. Just switching the " for ' leaves a broken confirmation message. I think we need to implement a no_html flag for patron_title.inc in the OPAC to properly fix this. Created attachment 185746 [details] [review] Bug 40602: Broken HTML showing in Alert 'subscriptions' tab This patch adds handling of the "no-html" flag to patron-title.inc. The OPAC alert subscriptions page passes the "no-html" flag but the include file wasn't written to include it. To test, apply the patch and log in to the OPAC as a user who has a title (salutation). - Add a serial subscription and set a notification template - Go to the OPAC and subscribe to the email notification for this subscription - Go to the patron account > Alert subscriptions tab - Verify that the last column shows an "Unsubscribe from email alerts" button. - There should be no errant HTML. Sponsored-by: Athens County Public Libraries Created attachment 186169 [details] [review] Bug 40602: Broken HTML showing in Alert 'subscriptions' tab This patch adds handling of the "no-html" flag to patron-title.inc. The OPAC alert subscriptions page passes the "no-html" flag but the include file wasn't written to include it. To test, apply the patch and log in to the OPAC as a user who has a title (salutation). - Add a serial subscription and set a notification template - Go to the OPAC and subscribe to the email notification for this subscription - Go to the patron account > Alert subscriptions tab - Verify that the last column shows an "Unsubscribe from email alerts" button. - There should be no errant HTML. Sponsored-by: Athens County Public Libraries Signed-off-by: noah <noah@inlibro.com> Hi Noah, I notice that your sign-off line is: Signed-off-by: noah <noah@inlibro.com> For the dashboard and the release notes we can do a mail map to your full name, but you might also consider to change your git setting to have it in the patches themselves. Created attachment 186372 [details] [review] Bug 40602: Broken HTML showing in Alert 'subscriptions' tab This patch adds handling of the "no-html" flag to patron-title.inc. The OPAC alert subscriptions page passes the "no-html" flag but the include file wasn't written to include it. To test, apply the patch and log in to the OPAC as a user who has a title (salutation). - Add a serial subscription and set a notification template - Go to the OPAC and subscribe to the email notification for this subscription - Go to the patron account > Alert subscriptions tab - Verify that the last column shows an "Unsubscribe from email alerts" button. - There should be no errant HTML. Sponsored-by: Athens County Public Libraries Signed-off-by: noah <noah@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Thanks a lot Owen! Hi Catherine, Sorry about that — I’ve updated my Git settings so my future sign-off lines will have my full name. Thanks for pointing it out! Created attachment 186433 [details] [review] Bug 40602: Broken HTML showing in Alert 'subscriptions' tab This patch adds handling of the "no-html" flag to patron-title.inc. The OPAC alert subscriptions page passes the "no-html" flag but the include file wasn't written to include it. To test, apply the patch and log in to the OPAC as a user who has a title (salutation). - Add a serial subscription and set a notification template - Go to the OPAC and subscribe to the email notification for this subscription - Go to the patron account > Alert subscriptions tab - Verify that the last column shows an "Unsubscribe from email alerts" button. - There should be no errant HTML. Sponsored-by: Athens County Public Libraries Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x Heuuu The line : - <span class="patron-title">[% patron.title | html %]</span> Becomes : + <span class="patron-title"></span> So there is no content. I bet this is not what we want. Yeah, this really looks weird. |