mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:31:02 +08:00
FIX: allows youtube embeds to respect the t
param (#21295)
This commit is contained in:
@ -21,11 +21,13 @@ class Onebox::Engine::YoutubeOnebox
|
||||
end
|
||||
|
||||
escaped_title = ERB::Util.html_escape(video_title)
|
||||
escaped_start_time = ERB::Util.html_escape(params["t"] || 0)
|
||||
|
||||
<<~HTML
|
||||
<div class="youtube-onebox lazy-video-container"
|
||||
data-video-id="#{video_id}"
|
||||
data-video-title="#{escaped_title}"
|
||||
data-video-start-time="#{escaped_start_time}"
|
||||
data-provider-name="youtube">
|
||||
<a href="https://www.youtube.com/watch?v=#{video_id}" target="_blank">
|
||||
<img class="youtube-thumbnail"
|
||||
|
Reference in New Issue
Block a user