mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
FIX: Remove double escaped Vimeo titles (#21368)
og_data is already escaped
This commit is contained in:
parent
0424eb8db2
commit
4e0563a8fe
@ -19,18 +19,15 @@ class Onebox::Engine::VimeoOnebox
|
||||
iframe_id = iframe_src.sub("https://player.vimeo.com/video/", "")
|
||||
end
|
||||
|
||||
thumbnail_url = get_opengraph.image
|
||||
escaped_title = ERB::Util.html_escape(og_data.title)
|
||||
|
||||
<<~HTML
|
||||
<div class="vimeo-onebox lazy-video-container"
|
||||
data-video-id="#{iframe_id}"
|
||||
data-video-title="#{escaped_title}"
|
||||
data-video-title="#{og_data.title}"
|
||||
data-provider-name="vimeo">
|
||||
<a href="https://vimeo.com/#{full_video_id}" target="_blank">
|
||||
<img class="vimeo-thumbnail"
|
||||
src="#{thumbnail_url}"
|
||||
title="#{escaped_title}">
|
||||
src="#{og_data.image}"
|
||||
title="#{og_data.title}">
|
||||
</a>
|
||||
</div>
|
||||
HTML
|
||||
|
Loading…
Reference in New Issue
Block a user