lib/onebox/helpers.rb in onebox-1.6.2 vs lib/onebox/helpers.rb in onebox-1.6.3

- old
+ new

@@ -61,7 +61,11 @@ end def self.truncate(string, length = 50) string.size > length ? string[0..length] + "..." : string end + + def self.title_attr(meta) + (meta && !blank?(meta[:title])) ? "title='#{CGI.escapeHTML(meta[:title])}'" : "" + end end end