diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index a73a236..b4a7774 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -237,7 +237,7 @@ class AnnouncementsController < ApplicationController "tag" => tag.name , "url" => OrbitHelper.page_for_tag(tag) } } rescue [] - files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title rescue '') } } rescue [] + files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path).encode('utf-8') : file.title rescue '') } } rescue [] links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue [] update_user = announcement.update_user.member_profile.name rescue "" @@ -285,7 +285,7 @@ class AnnouncementsController < ApplicationController } } - files = announcement["bulletin_files"].map{|file| { "file_url" => file["url"], "file_title" => (file["title_translations"][locale] == "" ? File.basename(file["url"]) : file["title_translations"][locale] rescue '') } } rescue [] + files = announcement["bulletin_files"].map{|file| { "file_url" => file["url"], "file_title" => (file["title_translations"][locale] == "" ? File.basename(file["url"]).encode('utf-8') : file["title_translations"][locale] rescue '') } } rescue [] links = announcement["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale] == "" ? link["url"] : link["title_translations"][locale]) } } rescue []