[Bug 12071] New: javascript broken for a search with double quotes
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Bug ID: 12071 Summary: javascript broken for a search with double quotes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com In staff interface, when performing a simple search with a double quote (ie "histoire algerie"), the javascript is broken in results page because of : function GetZ3950Terms(){ var strQuery="&frameworkcode="; strQuery += "&" + "title" + "=" + ""histoire%20algerie""; Double quotes are not URI-escaped. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 --- Comment #1 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 26997 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26997&action=edit Bug 12071 - javascript broken for a search with double quotes In staff interface, when performing a simple search with a double quote (ie "histoire algerie"), the javascript is broken in results page because of : function GetZ3950Terms(){ var strQuery="&frameworkcode="; strQuery += "&" + "title" + "=" + ""histoire%20algerie""; This patch moves URI escaping from perl to template with uri TT filter. Test plan : - In staff interface, perform a search with double quotes that will return no result, ie "aaa xxx" => Without patch, javascript is broken => With patch, javascript is not broken - Click on Z3950 button on results page => Without patch, the Title input is empty => With patch, the Title input contains the search terms -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- I can't reproduce this bug in master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 --- Comment #3 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Owen Leonard from comment #2)
I can't reproduce this bug in master. I found it occurs on a server with Debian Squeeze and not on my laptop with Ubuntu 13.10, maybe a difference in library URI::Escape. Still it must be corrected because most of libraries servers run Debian Squeeze. Also, escaping URL characters into TT is a better code, regarding to MVC layers.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 27116 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27116&action=edit Patch fixes encoding problem as well (e.g. äöü) I tryed to reproduce the problem and found an other one: If you do a search for someting like äöü and then hit Z39.50 button, the encoding in the Z39.50 search form is broken. With patch, the encoding is correct. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 27117 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27117&action=edit [SIGNED-OFF] Bug 12071 - javascript broken for a search with double quotes In staff interface, when performing a simple search with a double quote (ie "histoire algerie"), the javascript is broken in results page because of : function GetZ3950Terms(){ var strQuery="&frameworkcode="; strQuery += "&" + "title" + "=" + ""histoire%20algerie""; This patch moves URI escaping from perl to template with uri TT filter. Test plan : - In staff interface, perform a search with double quotes that will return no result, ie "aaa xxx" => Without patch, javascript is broken => With patch, javascript is not broken - Click on Z3950 button on results page => Without patch, the Title input is empty => With patch, the Title input contains the search terms Additional test: Do a search with something like äöü and then click Z3950 button on results page. Without patch, encoding is broken in Z3950 form With patch, encoding is correct. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26997|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 27272 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27272&action=edit [PASSED QA] Bug 12071 - Javascript broken for a search with double quotes In staff interface, when performing a simple search with a double quote (ie "histoire algerie"), the javascript is broken in results page because of : function GetZ3950Terms(){ var strQuery="&frameworkcode="; strQuery += "&" + "title" + "=" + ""histoire%20algerie""; This patch moves URI escaping from perl to template with uri TT filter. Test plan : - In staff interface, perform a search with double quotes that will return no result, ie "aaa xxx" => Without patch, javascript is broken => With patch, javascript is not broken - Click on Z3950 button on results page => Without patch, the Title input is empty => With patch, the Title input contains the search terms Additional test: Do a search with something like äöü and then click Z3950 button on results page. Without patch, encoding is broken in Z3950 form With patch, encoding is correct. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixed a few tabs. Passes tests and QA script. I can't reproduce the Javascript problem, but I can reproduce the Z39.50 encoding problem and can detect no regression. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27117|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master, thanks Fridolin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #8 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12071 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #9 from Nicole C. Engard <nengard@gmail.com> --- *** Bug 13038 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org