From 1c351709bc45611c2ed48fb8539c2b27ab51b6fe Mon Sep 17 00:00:00 2001 From: Eugen Date: Fri, 7 Apr 2017 11:09:14 +0200 Subject: [PATCH] Force UTF8 encoding on generated XML (#1140) --- Procfile | 2 +- app/lib/atom_serializer.rb | 2 +- app/views/layouts/application.html.haml | 6 ++++-- config/puma.rb | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Procfile b/Procfile index 6cdd89518f2..646e26059e0 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ web: bundle exec puma -C config/puma.rb -worker: bundle exec sidekiq -q default -q mailers -q push +worker: bundle exec sidekiq -q default -q push -q pull -q mailers diff --git a/app/lib/atom_serializer.rb b/app/lib/atom_serializer.rb index 21f485c2d37..4e01c3d4302 100644 --- a/app/lib/atom_serializer.rb +++ b/app/lib/atom_serializer.rb @@ -7,7 +7,7 @@ class AtomSerializer def render(element) document = Ox::Document.new(version: '1.0') document << element - "#{Ox.dump(element)}" + ('' + Ox.dump(element)).force_encoding('UTF-8') end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 7eae6982bd0..abab14a2877 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,8 +11,10 @@ %meta{:name => "theme-color", :content => "#282c37"}/ %meta{:name => "apple-mobile-web-app-capable", :content => "yes"}/ - %title - = "#{yield(:page_title)} - " if content_for?(:page_title) + %title< + - if content_for?(:page_title) + = yield(:page_title) + = ' - ' = Setting.site_title = stylesheet_link_tag 'application', media: 'all' diff --git a/config/puma.rb b/config/puma.rb index 550129bdc60..191f00ccaae 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -9,7 +9,7 @@ preload_app! on_worker_boot do if ENV['HEROKU'] # Spawn the workers from Puma, to only use one dyno - @sidekiq_pid ||= spawn('bundle exec sidekiq -q default -q mailers -q push') + @sidekiq_pid ||= spawn('bundle exec sidekiq -q default -q push -q pull -q mailers ') end ActiveRecord::Base.establish_connection if defined?(ActiveRecord)