Handle unicode characters in autotag (#2336)

This commit is contained in:
WithoutPants
2022-02-28 13:12:43 +11:00
committed by GitHub
parent c5c94e783e
commit 1ab5be162e
6 changed files with 41 additions and 11 deletions

View File

@@ -145,7 +145,6 @@ func (qb *studioQueryBuilder) QueryForAutoTag(words []string) ([]*models.Studio,
var args []interface{}
// always include names that begin with a single character
singleFirstCharacterRegex := "^[\\w][.\\-_ ]"
whereClauses = append(whereClauses, "studios.name regexp ? OR COALESCE(studio_aliases.alias, '') regexp ?")
args = append(args, singleFirstCharacterRegex, singleFirstCharacterRegex)