From bc161034c1c79043d942e2118d0dcc24dd943c0e Mon Sep 17 00:00:00 2001 From: Kelson42 Date: Sat, 20 Sep 2014 16:05:19 +0200 Subject: [PATCH] + Fix unstable fulltext library search --- src/common/kiwix/manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/kiwix/manager.cpp b/src/common/kiwix/manager.cpp index 45e1c282d..46fb3373b 100644 --- a/src/common/kiwix/manager.cpp +++ b/src/common/kiwix/manager.cpp @@ -512,7 +512,8 @@ namespace kiwix { if (ok == true && !publisher.empty() && itr->publisher != publisher) ok = false; - if ((ok == true && !search.empty()) && !(matchRegex(itr->title, search) || matchRegex(itr->description, search))) + if ((ok == true && !search.empty()) && !(matchRegex(itr->title, "\\Q" + search + "\\E") || + matchRegex(itr->description, "\\Q" + search + "\\E"))) ok = false; if (ok == true) {