[Bug 22243] New: Advanced Cataloguer editor fails if the target contains an apostrophe in the name
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Bug ID: 22243 Summary: Advanced Cataloguer editor fails if the target contains an apostrophe in the name Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: andrew.isherwood@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- As the title, if a z39.50 target has an apostrophe in the name, the editor fails with an "Unexpected token" Javascript error. The array containing the targets is constructed then embedded in the page template and, since the string is enclosed in unescaped single apostrophes, things fall over. The fix is to replace ' in target names with ' -- 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=22243 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |andrew.isherwood@ptfs-europ |ity.org |e.com -- 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=22243 --- Comment #1 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Created attachment 84566 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84566&action=edit Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- This patch doesn't work for me. What about doing this? name: '[% server.servername | html_entity %]', It looks like the html_entity filter is what we want here: http://template-toolkit.org/docs/manual/Filters.html#section_html_entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Alexis Ripetti <alexis.ripetti@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84566|0 |1 is obsolete| | --- Comment #3 from Alexis Ripetti <alexis.ripetti@inLibro.com> --- Created attachment 114499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114499&action=edit Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Andrew Fuerste-Henry <andrew@bywatersolutions.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=22243 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114499|0 |1 is obsolete| | --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 114502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114502&action=edit Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 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=22243 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114502|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114561&action=edit Bug 22243: Fix unescaped apostrophe in Z target This patch escapes apostrophes in the z39.50 target name prior to them being embedded in the template. To test: - Create a z39.50 target containing an apostrophe in the title - Note that the Advanced Cataloguer editor does not load - Apply the patch - TEST: Note that the Advanced Cataloguer editor does load Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.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=22243 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.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=22243 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not sure this was the best way to fix. There are only a few places with 'html_entity' filter. Other places use double-quotes for JS strings and html TT filter replaces double-quotes with " -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.01 released in| | Status|Pushed to master |Pushed to stable --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.01 |21.05.00,20.11.01,20.05.07 released in| | Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22243 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org