lib/onebox/engine/imgur_onebox.rb in onebox-1.8.65 vs lib/onebox/engine/imgur_onebox.rb in onebox-1.8.66
- old
+ new
@@ -29,16 +29,17 @@
end
def album_html(og)
escaped_url = ::Onebox::Helpers.normalize_url_for_output(url)
escaped_src = ::Onebox::Helpers.normalize_url_for_output(get_secure_link(og[:image]))
+ album_title = "[Album] #{Onebox::Helpers.truncate(og[:title].strip, 80)}"
<<-HTML
<div class='onebox imgur-album'>
<a href='#{escaped_url}' target='_blank'>
<span class='outer-box' style='width:#{og[:image_width]}px'>
<span class='inner-box'>
- <span class='album-title'>[Album] #{og[:title]}</span>
+ <span class='album-title'>#{album_title}</span>
</span>
</span>
<img src='#{escaped_src}' #{Helpers.title_attr(og)} height='#{og[:image_height]}' width='#{og[:image_width]}'>
</a>
</div>