[Bug 18689] New: adding a holiday in holidays.pl with double-quotes in title or description breaks calendar.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Bug ID: 18689 Summary: adding a holiday in holidays.pl with double-quotes in title or description breaks calendar. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: barton@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To replicate: 1/ Go to Tools > Calendar 2/ Click on a date 3/ Enter a title with text enclosed in double quotes "like this". 4/ Click Save This will cause a JavaScript error that prevents the calendar from displaying: holidays.pl?branch=CPL&calendardate=2017-05-01:382 Uncaught SyntaxError: Unexpected identifier Here's an example of the code that's erroring out: holidays["2017/5/1"] = {title:"This will cause "failure". ", description:"asdf"}; The problem is that the quotes are not escaped. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |major --- Comment #1 from Barton Chittenden <barton@bywatersolutions.com> --- Marking importance as major, because the bug creates an error that the user can't recover from. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=15271 CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=11235 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=13747 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=5471 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=9814 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16976 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16863 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17151 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #2 from Barton Chittenden <barton@bywatersolutions.com> --- *** Bug 15271 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldjamison@marywood.edu --- Comment #3 from Lee Jamison <ldjamison@marywood.edu> --- Created attachment 63946 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63946&action=edit Anomaly result of following replication steps Barton, I'm not sure if this would fall under this bug or a new bug, but when following your instructions to replicate I actually experienced a completely different result. I'm using Kohadevbox with a Debian 8 host. I followed the same procedure using both Google Chrome and Mozilla Firefox with the same result on both browsers. What's happening for me is instead of a Javascript error, what I'm getting is literally an empty screen (see attachment). The empty screen ONLY occurs by putting double quotes around the title text. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #4 from Lee Jamison <ldjamison@marywood.edu> --- Also of note, using single quotes 'like this' does NOT cause the bug to occur. Single quotes result in expected behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #5 from Marc Véron <veron@veron.ch> --- (In reply to Lee Jamison from comment #3)
Created attachment 63946 [details] Anomaly result of following replication steps
Barton, I'm not sure if this would fall under this bug or a new bug, but when following your instructions to replicate I actually experienced a completely different result. I'm using Kohadevbox with a Debian 8 host. I followed the same procedure using both Google Chrome and Mozilla Firefox with the same result on both browsers.
What's happening for me is instead of a Javascript error, what I'm getting is literally an empty screen (see attachment). The empty screen ONLY occurs by putting double quotes around the title text.
I get such empty screen with at least one of title or text columns having quotes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #6 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 63949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63949&action=edit Clarification of replication steps -- screenshot 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #7 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 63950 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63950&action=edit Clarification of replication steps -- screenshot 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #8 from Barton Chittenden <barton@bywatersolutions.com> --- Created attachment 63951 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63951&action=edit Clarification of replication steps -- screenshot 3 I wasn't clear in my description -- Lee's screenshot shows exactly what I saw on the screen when I added double quotes to one of the text fields. I saw the JavaScript error when I launched Chrome developer tools, as shown in my attached screenshots. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|adding a holiday in |Fix error with double |holidays.pl with |quotes in title or |double-quotes in title or |description of holiday |description breaks | |calendar. | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix error with double |Fix calendar error with |quotes in title or |double quotes in title or |description of holiday |description of holiday -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 --- Comment #9 from Marc Véron <veron@veron.ch> --- Created attachment 63952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63952&action=edit Fix calendar error with double quotes in title or description of holiday This patch fixes the calendar display with holidays having double qoutes in title or description. To test: - Apply patch - Go to Home > Tools > Calendar - Create new holidays of each type (Day only, repeated wekly/yearly, range, yearly repeated range and enter double qoutes in their titles and descriptions - Verify that calendar displays and works as expected - Verify that you can edit the holidays -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18727 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Lee Jamison <ldjamison@marywood.edu> 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=18689 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63952|0 |1 is obsolete| | --- Comment #10 from Lee Jamison <ldjamison@marywood.edu> --- Created attachment 63961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63961&action=edit Attachment to Bug 18689 - Fix calendar error with double quotes in title or description of holiday Fix calendar error with double quotes in title or description of holiday This patch fixes the calendar display with holidays having double qoutes in title or description. To test: - Apply patch - Go to Home > Tools > Calendar - Create new holidays of each type (Day only, repeated wekly/yearly, range, yearly repeated range and enter double qoutes in their titles and descriptions - Verify that calendar displays and works as expected - Verify that you can edit the holidays https://bugs.koha-community.org/show_bug.cgi?id=18689 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=18689 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63961|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64143 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64143&action=edit Bug 18689: calendar error with double quotes in title or description of holiday This patch fixes the calendar display with holidays having double qoutes in title or description. To test: - Apply patch - Go to Home > Tools > Calendar - Create new holidays of each type (Day only, repeated wekly/yearly, range, yearly repeated range and enter double qoutes in their titles and descriptions - Verify that calendar displays and works as expected - Verify that you can edit the holidays Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, 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=18689 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.09. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #15 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.15 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18689 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|Oldversions |--- -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org