Skip to content

Commit

Permalink
FIX: truncate google docs description
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitjalan committed Oct 23, 2017
1 parent 99a0169 commit 5a1d394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/onebox/engine/google_docs_onebox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def data
og_data = get_og_data
result = { link: link,
title: og_data[:title] || "Google #{shorttype.to_s.capitalize}",
description: og_data[:description] || "This #{shorttype.to_s.chop.capitalize} is private",
description: Sanitize.fragment(Onebox::Helpers.truncate(og_data[:description], 250)) || "This #{shorttype.to_s.chop.capitalize} is private",
type: shorttype
}
result
Expand Down

0 comments on commit 5a1d394

Please sign in to comment.