diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-25 21:30:27 +0500 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-25 21:47:55 +0500 |
commit | 3164b0a2c1e6b000d933263716f2e3f2ff1cca52 (patch) | |
tree | ffd905956e95ea62d118ea0915bed0bcbce828d9 /actionpack/lib/action_view/helpers | |
parent | 2b9bce88e12c1e23320a6e4733198d1125939c0d (diff) | |
download | rails-3164b0a2c1e6b000d933263716f2e3f2ff1cca52.tar.gz rails-3164b0a2c1e6b000d933263716f2e3f2ff1cca52.tar.bz2 rails-3164b0a2c1e6b000d933263716f2e3f2ff1cca52.zip |
change ^ and $ anchors in regexp to \A and \z respectively
http://guides.rubyonrails.org/security.html#regular-expressions
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 08efc98a50..27ba57ff58 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -390,7 +390,7 @@ module ActionView end if size = options.delete(:size) - options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$} + options[:width], options[:height] = size.split("x") if size =~ %r{\A\d+x\d+\z} options[:width] = options[:height] = size if size =~ %r{\A\d+\z} end |