]> 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)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 3 Apr 2013 19:35:00 +0000 (08:35 +1300)
commit60ba64a9e5a1ae29f752016732ec28f3b8514c81
tree7497b800a2c98c0b31c64992271c04455ad4dd66
parent1e93f75f42b1503a9e24a53d3b6981f9aa0044f2
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: Chris Cormack <chrisc@catalyst.net.nz>
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