]> cat aescling's git repositories - mastodon.git/commitdiff
Force UTF8 encoding on generated XML (#1140)
authorEugen <eugen@zeonfederated.com>
Fri, 7 Apr 2017 09:09:14 +0000 (11:09 +0200)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2017 09:09:14 +0000 (11:09 +0200)
Procfile
app/lib/atom_serializer.rb
app/views/layouts/application.html.haml
config/puma.rb

index 6cdd89518f2dc1a3ccccf676a036b01ff949dc24..646e26059e0918d5d1bf99da23ddd8282cc1c35c 100644 (file)
--- 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
index 21f485c2d3775eac9f9a5d1e6d896f3b45dae5e1..4e01c3d4302624f291360cb8b23d7e7ee6d9ad83 100644 (file)
@@ -7,7 +7,7 @@ class AtomSerializer
     def render(element)
       document = Ox::Document.new(version: '1.0')
       document << element
-      "<?xml version=\"1.0\"?>#{Ox.dump(element)}"
+      ('<?xml version="1.0"?>' + Ox.dump(element)).force_encoding('UTF-8')
     end
   end
 
index 7eae6982bd0dc90290a261f3eed85b8c31c2e65c..abab14a28778201cedda529575fcc207fc4d9054 100644 (file)
     %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'
index 550129bdc604595cd5e9ac43682c53df1bcaf936..191f00ccaae9971bc5ba43670ad6d479999e845d 100644 (file)
@@ -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)