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
1 changed files with 1 additions and 1 deletions

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