Commit c2ba868c9b92a90e53972b5e357c39df2606699c
Exists in
master
and in
4 other branches
Merge pull request #2954 from cabeca/fix-image-url-emoji
Fix image url for emoji.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -164,7 +164,8 @@ module ApplicationHelper |
164 | 164 | end |
165 | 165 | |
166 | 166 | def image_url(source) |
167 | - root_url + path_to_image(source) | |
167 | + # prevent relative_root_path being added twice (it's part of root_url and path_to_image) | |
168 | + root_url.sub(/#{root_path}$/, path_to_image(source)) | |
168 | 169 | end |
169 | 170 | |
170 | 171 | alias_method :url_to_image, :image_url | ... | ... |