瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 2 年之前
父節點
當前提交
c9ac3dd2fa
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/model/search.go

+ 1 - 1
kernel/model/search.go

@@ -710,7 +710,7 @@ func fullTextSearchRefBlock(keyword string, beforeLen int, onlyDoc bool) (ret []
              when memo LIKE '%${keyword}%' then 90
              when content LIKE '%${keyword}%' and type != 'i' and type != 'l' then 100
              else 65535 end ASC, sort ASC, length ASC`
-	orderBy = strings.ReplaceAll(orderBy, "${keyword}", keyword)
+	orderBy = strings.ReplaceAll(orderBy, "${keyword}", quotedKeyword)
 	stmt += orderBy + " LIMIT " + strconv.Itoa(Conf.Search.Limit)
 	blocks := sql.SelectBlocksRawStmtNoParse(stmt, Conf.Search.Limit)
 	ret = fromSQLBlocks(&blocks, "", beforeLen)