1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #35166 from znz/improve-regexp

Improve regexp of `html_safe_translation_key?`
This commit is contained in:
Aaron Patterson 2019-02-05 09:53:14 -08:00 committed by GitHub
commit deca8c5230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ module ActionView
end
def html_safe_translation_key?(key)
/(\b|_|\.)html$/.match?(key.to_s)
/([_.]|\b)html\z/.match?(key.to_s)
end
end
end