mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Giphy oneboxing when the response is an image (#13199)
This commit is contained in:
@@ -11,7 +11,12 @@ module Onebox
|
||||
|
||||
def to_html
|
||||
og = get_opengraph
|
||||
"<img src='#{og.image}' width='#{og.image_width}' height='#{og.image_height}' class='animated onebox' #{og.title_attr}>"
|
||||
if og.image
|
||||
"<img src='#{og.image}' width='#{og.image_width}' height='#{og.image_height}' class='animated onebox' #{og.title_attr}>"
|
||||
else
|
||||
escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
|
||||
"<img src='#{escaped_url}' class='animated onebox'>"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user