mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: tag search should not be case sensitive
This commit is contained in:
@@ -56,6 +56,7 @@ module DiscourseTagging
|
||||
def self.filter_allowed_tags(query, guardian, opts={})
|
||||
term = opts[:term]
|
||||
if term.present?
|
||||
term.downcase!
|
||||
term.gsub!(/[^a-z0-9\.\-\_]*/, '')
|
||||
term.gsub!("_", "\\_")
|
||||
query = query.where('tags.name like ?', "%#{term}%")
|
||||
|
Reference in New Issue
Block a user