mirror of
https://github.com/discourse/discourse.git
synced 2025-01-16 03:42:41 +08:00
FIX: Fallback when embedding YouTube videos with lazy videos (#30514)
This commit is contained in:
parent
91f7ae2741
commit
bba4c9b005
|
@ -20,6 +20,8 @@ class Onebox::Engine::YoutubeOnebox
|
|||
thumbnail_url = result[:image]
|
||||
end
|
||||
|
||||
return default_onebox_to_html if video_title.chomp("- YouTube").blank? || thumbnail_url.blank?
|
||||
|
||||
escaped_title = ERB::Util.html_escape(video_title)
|
||||
escaped_start_time = ERB::Util.html_escape(params["t"])
|
||||
t_param = "&t=#{escaped_start_time}" if escaped_start_time.present?
|
||||
|
|
Loading…
Reference in New Issue
Block a user