autocomplete: match static metatags case-sensitively.

Fix rating:S not matching rating:s.
This commit is contained in:
evazion
2021-02-25 06:12:24 -06:00
parent 6ff648e40b
commit 1b93cbd075
2 changed files with 7 additions and 1 deletions

View File

@@ -161,7 +161,7 @@ class AutocompleteService
def autocomplete_static_metatag(metatag, value)
values = STATIC_METATAGS[metatag.to_sym]
results = values.select { |v| v.starts_with?(value) }.sort.take(limit)
results = values.select { |v| v.starts_with?(value.downcase) }.sort.take(limit)
results.map do |v|
{ label: metatag + ":" + v, value: v }