]> git.koha-community.org Git - koha.git/commit
Bug 9554: single quote in didyoumean
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Mon, 4 Feb 2013 16:48:58 +0000 (17:48 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 20 Mar 2013 01:01:51 +0000 (21:01 -0400)
commitf694ed6ba103986276b71a5460931aedfc5c7228
treeeeb61fc0818308e18bb2cd019f172530a96fb28a
parent50c444bc7b4591e4e1e76e129ba721650e9a1c31
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>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/prog/en/modules/svc/suggestion.tt