mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 01:07:19 +08:00
DEV: Prefer \A and \z over ^ and $ in regexes (#19936)
This commit is contained in:

committed by
GitHub

parent
f7907a3645
commit
666536cbd1
@ -160,7 +160,7 @@ class Admin::SiteTextsController < Admin::AdminController
|
||||
{ id: key, value: value, locale: locale }
|
||||
end
|
||||
|
||||
PLURALIZED_REGEX = /(.*)\.(zero|one|two|few|many|other)$/
|
||||
PLURALIZED_REGEX = /(.*)\.(zero|one|two|few|many|other)\z/
|
||||
|
||||
def find_site_text(locale)
|
||||
if self.class.restricted_keys.include?(params[:id])
|
||||
|
Reference in New Issue
Block a user