aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-25 21:30:27 +0500
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-25 21:47:55 +0500
commit3164b0a2c1e6b000d933263716f2e3f2ff1cca52 (patch)
treeffd905956e95ea62d118ea0915bed0bcbce828d9
parent2b9bce88e12c1e23320a6e4733198d1125939c0d (diff)
downloadrails-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
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb2
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