FIX: Escape regex pattern variable before using it

This commit is contained in:
Vinoth Kannan
2018-08-31 03:02:24 +05:30
parent c6f339a0b5
commit 297e8aaf2e
2 changed files with 3 additions and 1 deletions

View File

@@ -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