From 556b606eee95245369a29dcd870b89e0d44686d8 Mon Sep 17 00:00:00 2001 From: hernani Date: Tue, 25 May 2010 10:43:29 +0000 Subject: [PATCH] Fixing /related_questions/ errors. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@325 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 ff29f14..fc64bac 100644 --- a/forum_modules/pgfulltext/handlers.py +++ b/forum_modules/pgfulltext/handlers.py @@ -15,7 +15,7 @@ def question_search(self, keywords): }, where=[""" "forum_rootnode_doc"."node_id" = "forum_node"."id" AND ("forum_rootnode_doc"."document" @@ to_tsquery('english', %s) OR - "forum_node"."title" ILIKE '""" + keywords + """%%') + "forum_node"."title" ILIKE '""" + keywords.replace("'",r"\'") + """%%') """], params=[tsquery], select_params=[tsquery], -- 2.39.5