diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-13 19:15:00 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-13 19:28:56 -0300 |
commit | 2ef29ef9af8634999b8b615ef1643ab630bc59d8 (patch) | |
tree | 8f27e9df202ba6628d50b59b5b7548266e0ec93a /actionpack/lib | |
parent | 9b40f5cc36c38fca7e78008eb1df97a93a849f89 (diff) | |
download | rails-2ef29ef9af8634999b8b615ef1643ab630bc59d8.tar.gz rails-2ef29ef9af8634999b8b615ef1643ab630bc59d8.tar.bz2 rails-2ef29ef9af8634999b8b615ef1643ab630bc59d8.zip |
Merge pull request #3237 from sakuro/data-url-scheme
Support data: url scheme
Conflicts:
actionpack/lib/action_view/asset_paths.rb
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/asset_paths.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb index add8d94b70..4ce41d51f1 100644 --- a/actionpack/lib/action_view/asset_paths.rb +++ b/actionpack/lib/action_view/asset_paths.rb @@ -4,7 +4,7 @@ require 'action_controller/metal/exceptions' module ActionView class AssetPaths #:nodoc: - URI_REGEXP = %r{^[-a-z]+://|^cid:|^//} + URI_REGEXP = %r{^[-a-z]+://|^(?:cid|data):|^//} attr_reader :config, :controller diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index a8d6213b13..3ba135d3d5 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -389,7 +389,7 @@ module ActionView src = options[:src] = path_to_image(source) - unless src =~ /^cid:/ + unless src =~ /^(?:cid|data):/ options[:alt] = options.fetch(:alt){ image_alt(src) } end |