]> git.openstreetmap.org Git - osqa.git/commitdiff
Improved the regular expression that removes bad characters from search queries.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 1 Jun 2010 21:34:30 +0000 (21:34 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 1 Jun 2010 21:34:30 +0000 (21:34 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@353 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/pgfulltext/handlers.py

index c8b4e090950de0c888c52553f7281c93b32c92c7..f6decaf01275e0d9a565e0c017a83503de150637 100644 (file)
@@ -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(