Skip to content

Commit

Permalink
fix redos
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooooo-q committed Jan 10, 2022
1 parent 3a5ad2a commit af5617c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n/interpolate/ruby.rb
Expand Up @@ -5,7 +5,7 @@ module I18n
DEFAULT_INTERPOLATION_PATTERNS = [
/%%/,
/%\{([\w|]+)\}/, # matches placeholders like "%{foo} or %{foo|word}"
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.d"
/%<(\w+)>([^\d]*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.d"
].freeze
INTERPOLATION_PATTERN = Regexp.union(DEFAULT_INTERPOLATION_PATTERNS)
deprecate_constant :INTERPOLATION_PATTERN
Expand Down

0 comments on commit af5617c

Please sign in to comment.