[Bug 9554] New: single quot not escaped by TT URL filter
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Bug ID: 9554 Summary: single quot not escaped by TT URL filter Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: fridolyn.somers@biblibre.com When using "url" or "uri" template toolkit filters, I noticed that double quotes are escaped (%22), but not single quotes. This causes sometimes a problem when URL is written in JavaScript code, in a string delimited by single quotes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|oleonard@myacpl.org |fridolyn.somers@biblibre.co | |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 15093 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15093&action=edit Proposed patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|single quot not escaped by |single quote in didyoumean |TT URL filter | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15093|0 |1 is obsolete| | --- Comment #2 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 15095 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15095&action=edit Proposed patch Added test plan and renamed bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15095|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 15177 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15177&action=edit Bug 9554: single quote in didyoumean When using "url" or "uri" template toolkit filters, I noticed that double quotes are escaped (%22), but not single quotes. This causes sometimes a problem when URL is written in JavaScript code, in a string delimited by single quotes. This patch corrects by using double quotes for js strings. Also, adds a test for "didyoumean" feature : when feature is not activated, do not add corresponding javascript. Test plan : - activate OpacHighlightedWords syspref - activate "didyoumean" feature for OPAC - perform a search begining with a single quote (ie "'sport") => look for javascript errors (you may use firebug) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- I'm not able to reproduce the issue. The results appear without any js errors. Could you confirm that the issue still exists? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 mathieu saby <mathieu.saby@univ-rennes2.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.saby@univ-rennes2.f | |r --- Comment #5 from mathieu saby <mathieu.saby@univ-rennes2.fr> --- Hello It is Rennes 2 who asked this bug to be fixed... I confirm it still exists on our preprod environnment (align on master on march 12th) error in Firebug : SyntaxError: missing ) after argument list oumean').load('/cgi-bin/koha/svc/suggestion?render=stub&q=l'histoire', M. Saby -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comment: This patch fixes the issue. IMO, too many single quotes are change, I don't know if it is blocker. I let the RM to take the decision. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15177|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 16264 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16264&action=edit Bug 9554: single quote in didyoumean When using "url" or "uri" template toolkit filters, I noticed that double quotes are escaped (%22), but not single quotes. This causes sometimes a problem when URL is written in JavaScript code, in a string delimited by single quotes. This patch corrects by using double quotes for js strings. Also, adds a test for "didyoumean" feature : when feature is not activated, do not add corresponding javascript. Test plan : - activate OpacHighlightedWords syspref - activate "didyoumean" feature for OPAC - perform a search begining with a single quote (ie "'sport") => look for javascript errors (you may use firebug) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- This doesn't apply to 3.10.x, please rebase and submit if it is needed for 3.10.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 --- Comment #10 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 17174 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17174&action=edit [3.10.x] Bug 9554: single quote in didyoumean Patch rebased for 3.10.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9554 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.10.x will be in 3.10.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org