PollFeed: check 'content:encoded' for content first

This commit is contained in:
Kyle Zhao 2017-09-17 00:50:32 -04:00
parent 0f2c5f5fc9
commit ac666ddf17
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ module Jobs
end
def content
@article_rss_item.content.try(:force_encoding, "UTF-8").try(:scrub) || @article_rss_item.description.try(:force_encoding, "UTF-8").try(:scrub)
@article_rss_item.content_encoded&.force_encoding("UTF-8")&.scrub ||
@article_rss_item.content&.force_encoding("UTF-8")&.scrub ||
@article_rss_item.description&.force_encoding("UTF-8")&.scrub
end
def title