Created
June 16, 2013 23:20
-
-
Save radar/5793814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> helper.image_tag("HTTP://google.com") | |
=> "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />" | |
irb(main):002:0> helper.image_tag("http://google.com") | |
=> "<img alt=\"Google\" src=\"http://google.com\" />" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The source for it is pretty damn basic, though:
https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/asset_tag_helper.rb#L198
The real culprit seems to be this
https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/asset_url_helper.rb#L108
although it appears to have been modified extremely recently
8fc34276 (David Celis 2013-06-16 16:57:49 -0700 108) URI_REGEXP = %r{^[-a-z]+://|^(?:cid|data):|^//}i
"davidcelis 14 hours ago Use a case insensitive URI Regexp for #asset_path"