about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/lib/atom_serializer.rb2
-rw-r--r--app/views/layouts/application.html.haml6
2 files changed, 5 insertions, 3 deletions
diff --git a/app/lib/atom_serializer.rb b/app/lib/atom_serializer.rb
index 21f485c2d..4e01c3d43 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
-      "<?xml version=\"1.0\"?>#{Ox.dump(element)}"
+      ('<?xml version="1.0"?>' + 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 7eae6982b..abab14a28 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'