FIX: Remove double escaped Vimeo titles (#21368)

og_data is already escaped
This commit is contained in:
Jan Cernik 2023-05-04 07:54:00 -03:00 committed by GitHub
parent 0424eb8db2
commit 4e0563a8fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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