Fix alt linkfor youtu.be urls

This commit is contained in:
Omar Roth 2018-05-07 20:50:55 -05:00
parent 75f8fcd40b
commit 0e85a04761

View File

@ -487,7 +487,7 @@ def add_alt_links(html)
END_HTML
elsif url.host == "youtu.be"
alt_link = <<-END_HTML
<a href="/watch?v=#{url.full_path.lchop("/")}">
<a href="/watch?v=#{url.path.try &.lchop("/")}&#{url.query}">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
END_HTML