소스 검색

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

Vanessa 1 년 전
부모
커밋
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)