Fix relative link in subtitle for feed.

This commit is contained in:
邱博亞 2023-12-30 21:15:22 +08:00
parent 5b3006c104
commit b7577c6b5f
1 changed files with 7 additions and 3 deletions

View File

@ -393,11 +393,15 @@ class Bulletin
a["org_is_top"] = (self.is_top ? 1 : 0)
a["id"] = self.uid
a["title_translations"] = self.title_translations
a["subtitle_translations"] = self.subtitle_translations
a["subtitle_translations"] = {}
self.subtitle_translations.each do |l, subtitle|
a["subtitle_translations"][l] = self.class.smart_convertor(subtitle,base_url)
end
a["text_translations"] = {}
text_translations = self.text_translations
a["text_translations"]["en"] = self.class.smart_convertor(text_translations["en"],base_url) if !text_translations["en"].blank?
a["text_translations"]["zh_tw"] = self.class.smart_convertor(text_translations["zh_tw"],base_url) if !text_translations["zh_tw"].blank?
self.text_translations.each do |l, text|
a["text_translations"][l] = self.class.smart_convertor(text,base_url)
end
a["postdate"] = self.postdate
a["image_description_translations"] = self.image_description_translations
a["image"] = {}