From 36d8ccc491b157c00e38a8f3192d47b7ead19964 Mon Sep 17 00:00:00 2001 From: hernani Date: Tue, 1 Jun 2010 21:34:30 +0000 Subject: [PATCH] Improved the regular expression that removes bad characters from search queries. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@353 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum_modules/pgfulltext/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum_modules/pgfulltext/handlers.py b/forum_modules/pgfulltext/handlers.py index c8b4e09..f6decaf 100644 --- a/forum_modules/pgfulltext/handlers.py +++ b/forum_modules/pgfulltext/handlers.py @@ -5,7 +5,7 @@ from forum.modules.decorators import decorate @decorate(QuestionManager.search, needs_origin=False) def question_search(self, keywords): - repl_re = re.compile(r'[^\'-_\s\w]') + repl_re = re.compile(r"[^\'\-_\s\w]") tsquery = " | ".join([k for k in repl_re.sub('', keywords).split(' ') if k]) return self.extra( -- 2.39.5