Bugzilla – Attachment 1450 Details for
Bug 3593
Term highlighting not working for exact term research and diacritics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed a regexp and an encoding issue.
0001--3.0.x-bug-3593-Fixes-highlightning-in-search-res.patch (text/plain), 1.23 KB, created by
Chris Cormack
on 2009-09-09 12:44:00 UTC
(
hide
)
Description:
Fixed a regexp and an encoding issue.
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-09-09 12:44:00 UTC
Size:
1.23 KB
patch
obsolete
>From d8668ddc4724bd3dbf52780f243014cb64330211 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Jean-Andr=C3=A9=20Santoni?= <jeanandre.santoni@biblibre.com> >Date: Wed, 9 Sep 2009 14:25:44 +0200 >Subject: [PATCH] [3.0.x](bug #3593) Fixes highlightning in search results > >I fixed a regexp and an encoding issue. >--- > C4/Search.pm | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 21eb767..f056900 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1180,7 +1180,7 @@ sub searchResults { > # add search-term highlighting via <span>s on the search terms > my $span_terms_hashref; > for my $span_term ( split( / /, $searchdesc ) ) { >- $span_term =~ s/(.*=|\)|\(|\+|\.|\*)//g; >+ $span_term =~ s/(.*=|\)|\(|\+|\.|\*|\")//g; > $span_terms_hashref->{$span_term}++; > } > >@@ -1356,6 +1356,9 @@ sub searchResults { > if ( length($term) > 3 ) { > $term =~ s/(.*=|\)|\(|\+|\.|\?|\[|\]|\\|\*)//g; > foreach(qw(title subtitle author publishercode place pages notes size)) { >+ if (! utf8::is_utf8($term)) { >+ utf8::decode($term); >+ } > $oldbiblio->{$_} =~ s/$term/<span class=\"term\">$&<\/span>/gi; > } > } >-- >1.6.0.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 3593
: 1450