Bugzilla – Attachment 33673 Details for
Bug 10956
Series of OPAC searches can cause a browser crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10956 - Series of OPAC searches can cause a browser crash
Bug-10956---Series-of-OPAC-searches-can-cause-a-br.patch (text/plain), 1.36 KB, created by
Marc Véron
on 2014-11-19 09:26:53 UTC
(
hide
)
Description:
Bug 10956 - Series of OPAC searches can cause a browser crash
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-11-19 09:26:53 UTC
Size:
1.36 KB
patch
obsolete
>From aa8e396961d63da85d3b137bde2e9157280e2ed5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 19 Nov 2014 10:20:04 +0100 >Subject: [PATCH] Bug 10956 - Series of OPAC searches can cause a browser > crash > >Solution: Prevent jQuery.fn.highlight = function(pat) to be called with empty pat >by skipping empty values in highlight loop. > >To test: >Without patch, do a search as in comment #1 odr #3 >Result: Endless loop (Script not responding) > >Appply patch: >No endless loop, page displays OK >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index e641d76..4881887 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1345,6 +1345,9 @@ > var x; > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >+ if (q_array[x].length == 0) { >+ continue; >+ } > q_array[x] = q_array[x].toLowerCase(); > var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if( $.inArray(q_array[x], myStopwords) == -1 ) { >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10956
:
33662
|
33667
|
33673
|
33674
|
33897
|
33903