[Bug 25379] New: HTML tags visible in Returns.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Bug ID: 25379 Summary: HTML tags visible in Returns.pl Change sponsored?: --- Product: Koha Version: 19.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: kelly@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 104375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104375&action=edit on returns.pl page With the introduction of this bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23409. ( Show circulation note and OPAC note with line feeds ), the ability to add HTML was included. However, when a patron note with HTML is seen during circulation (check-in)- the HTML tags are visible. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- This uses the $raw filter for the circulation note and HTML can be added since it is input from the staff side. As for the opacnote, I think this filter needs to remain HTML as OPAC users should not be able to add their own HTML. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Lucas, but the patrons can't change/set these notes - only the library staff can. They are only shown in OPAC. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Cait, In that case it would be OK to change those filters from HTML to $raw? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we have done in other places like the OPAC item notes - so it might be ok. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|19.11 |master Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | Summary|HTML tags visible in |HTML in circulation notes |Returns.pl |doesn't show correctly on | |checkin -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 148387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148387&action=edit Bug 25379: Add raw filter to circulation note on checkin page This is a consistency patch: we already allow adding HTML tags to the patron circulation note and the contents display correctly in the patron account and in the patron search results in the staff interface. But the HTML tags are printed on the checkins page. To test: * Add a circulation note including HTML tags to a patron Example: <h1>This patron is great!</h1> * Check an item out to this patron * Verify that the note displays formatted in patron search results * Verify that the note displays formatted in the patron record * Return the item * Verify the note shows the printed tags * Apply patch * Check item out again and check it in again * Verify the note now displays correctly in list of checkins -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148387|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 148496 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148496&action=edit Bug 25379: Add raw filter to circulation note on checkin page This is a consistency patch: we already allow adding HTML tags to the patron circulation note and the contents display correctly in the patron account and in the patron search results in the staff interface. But the HTML tags are printed on the checkins page. To test: * Add a circulation note including HTML tags to a patron Example: <h1>This patron is great!</h1> * Check an item out to this patron * Verify that the note displays formatted in patron search results * Verify that the note displays formatted in the patron record * Return the item * Verify the note shows the printed tags * Apply patch * Check item out again and check it in again * Verify the note now displays correctly in list of checkins Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Shouldn't we use html_linebreak as well? We do in moremember: [% patron.borrowernotes | $raw | html_line_break %] Also, why are we only dealing with the checkin page? There are other places where it's displayed escaped (`git grep 'borrowernotes | html'`) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33637 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148496|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150395&action=edit Bug 25379: Add raw filter to circulation note on checkin page This is a consistency patch: we already allow adding HTML tags to the patron circulation note and the contents display correctly in the patron account and in the patron search results in the staff interface. But the HTML tags are printed on the checkins page. To test: * Add a circulation note including HTML tags to a patron Example: <h1>This patron is great!</h1> * Check an item out to this patron * Verify that the note displays formatted in patron search results * Verify that the note displays formatted in the patron record * Return the item * Verify the note shows the printed tags * Apply patch * Check item out again and check it in again * Verify the note now displays correctly in list of checkins Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 150396 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150396&action=edit Bug 25379: (QA follow-up) Adjust other occurrences and add line break This updates the other occurrences and adds html_line_break to all except the edit page - it seems html or raw doesn't affect the value of the textarea, but moved to raw for consistency To test: 1 - Add an HTML note to a patron, make sure to add a line break: <h1>Testing</h1> <h2>Newline</h2> 2 - Checkout to patron and return 3 - Confirm note shows correctly 4 - Add patron to a list 5 - Confirm note displays correctly 6 - Edit patron, confirm note field is correct 7 - Batch modify borrower 8 - Confirm note displays correctly in batch list Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Minor followups, RM can veirfy, PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks, Nick! I am not sure really about allowing HTML and then also meddling with line breaks. It creates a somewhat weird combination. html_line_break This filter replaces any newlines with <br> HTML tags, thus preserving the line breaks of the original text in the HTML output. So you can do now without <br>, but if you add any line breaks just for making the HTML more readable, they will also all create a line break. Should we not do either/or? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #11)
if you add any line breaks just for making the HTML more readable, they will also all create a line break. Should we not do either/or?
We had calls that already did this - if we want either or, we need a flag to determine whether the field is HTML or not, otherwise we need to test with regex? I don't think the additional breaks for HTML cause a problem, but I'll follow your viewpoint. Maybe a new bug - so we can make a decision and be consistent on all the calls? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nick Clemens from comment #12)
(In reply to Katrin Fischer from comment #11)
if you add any line breaks just for making the HTML more readable, they will also all create a line break. Should we not do either/or?
We had calls that already did this - if we want either or, we need a flag to determine whether the field is HTML or not, otherwise we need to test with regex?
I don't think the additional breaks for HTML cause a problem, but I'll follow your viewpoint. Maybe a new bug - so we can make a decision and be consistent on all the calls?
I think mostly people will probably use bold, italic etc and not do whole paragraphs here, so we are probably OK with the line breaks. You are right, we should discuss separately when needed, but I feel we can wait and see if it actually turns out to be an issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Patrick Robitaille <patrick.robitaille@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick.robitaille@collecto | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25379 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org