diff options
author | Aaron Patterson <tenderlove@github.com> | 2019-02-05 09:53:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 09:53:14 -0800 |
commit | deca8c52300ff59a98a138f94a33834725511a0b (patch) | |
tree | 5bf9a68964f12b151aa5d48428c9454dad5811b6 | |
parent | b851763567463e8b03fe18632b641789dc14155b (diff) | |
parent | 30a08a898862a67502e58074ffaa8cc2338840f5 (diff) | |
download | rails-deca8c52300ff59a98a138f94a33834725511a0b.tar.gz rails-deca8c52300ff59a98a138f94a33834725511a0b.tar.bz2 rails-deca8c52300ff59a98a138f94a33834725511a0b.zip |
Merge pull request #35166 from znz/improve-regexp
Improve regexp of `html_safe_translation_key?`
-rw-r--r-- | actionview/lib/action_view/helpers/translation_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index ae1c93e12f..67c86592b9 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -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 |