mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Escape regex pattern variable before using it
This commit is contained in:
@@ -44,7 +44,7 @@ module I18n
|
||||
results = {}
|
||||
|
||||
fallbacks(locale).each do |fallback|
|
||||
find_results(/#{query}/i, results, translations[fallback])
|
||||
find_results(/#{Regexp.escape(query)}/i, results, translations[fallback])
|
||||
end
|
||||
|
||||
results
|
||||
|
||||
Reference in New Issue
Block a user