FIX: keep onebox body content in post excerpts for schema data.

This commit is contained in:
Vinoth Kannan 2019-11-02 17:31:38 +05:30
parent e974c35d38
commit 797d450b73
1 changed files with 2 additions and 2 deletions

View File

@ -248,7 +248,7 @@ SQL
question_json = {
'@type' => 'Question',
'name' => topic.title,
'text' => first_post.excerpt,
'text' => first_post.excerpt(nil, keep_onebox_body: true),
'upvoteCount' => first_post.like_count,
'answerCount' => 0,
'dateCreated' => topic.created_at,
@ -262,7 +262,7 @@ SQL
question_json['answerCount'] = 1
question_json[:acceptedAnswer] = {
'@type' => 'Answer',
'text' => accepted_answer.excerpt,
'text' => accepted_answer.excerpt(nil, keep_onebox_body: true),
'upvoteCount' => accepted_answer.like_count,
'dateCreated' => accepted_answer.created_at,
'url' => accepted_answer.full_url,