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:17:28 -0300 |
commit | 9ff97b0605aa5572eed3562ca4514f38dac88e6d (patch) | |
tree | 1df4af28b5b87915e6fb8e36c70220118070803b /actionpack/lib | |
parent | e7d5ba37f07ee8ff9daa3d80a81c8afc0b7148cc (diff) | |
download | rails-9ff97b0605aa5572eed3562ca4514f38dac88e6d.tar.gz rails-9ff97b0605aa5572eed3562ca4514f38dac88e6d.tar.bz2 rails-9ff97b0605aa5572eed3562ca4514f38dac88e6d.zip |
Merge pull request #3237 from sakuro/data-url-scheme
Support data: url scheme
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 aa5db0d7bc..f6115dbb1b 100644 --- a/actionpack/lib/action_view/asset_paths.rb +++ b/actionpack/lib/action_view/asset_paths.rb @@ -37,7 +37,7 @@ module ActionView end def is_uri?(path) - path =~ %r{^[-a-z]+://|^cid:|^//} + path =~ %r{^[-a-z]+://|^(?:cid|data):|^//} end private diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index 5dbba3c4a7..4ee7d7c9c9 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -358,7 +358,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 |