bug fixes

This commit is contained in:
albert
2013-03-06 01:39:25 -05:00
parent 93ac6601aa
commit 31927b54d7
2 changed files with 8 additions and 4 deletions

View File

@@ -938,8 +938,8 @@ class Post < ActiveRecord::Base
end
def raw_tag_match(tag)
tag = tag.gsub("(", '\\\\\\\\(')
where("posts.tag_index @@ to_tsquery('danbooru', E?)", tag)
tag = PostQueryBuilder.escape_string_for_tsquery(tag)
where("posts.tag_index @@ to_tsquery('danbooru', E'" + tag + "')")
end
def tag_match(query)