This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 010f90ee Fix up subject encoding errors
010f90ee is described below

commit 010f90ee79818afe212f12c2aa9532e825f24de9
Author: Sebb <[email protected]>
AuthorDate: Mon Jan 16 00:46:26 2023 +0000

    Fix up subject encoding errors
---
 www/secretary/workbench/models/mailbox.rb  | 2 +-
 www/secretary/workbench/views/body.html.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/models/mailbox.rb 
b/www/secretary/workbench/models/mailbox.rb
index 2c95e4e4..a4b0791a 100644
--- a/www/secretary/workbench/models/mailbox.rb
+++ b/www/secretary/workbench/models/mailbox.rb
@@ -180,7 +180,7 @@ class Mailbox
         href: "#{message[:source]}/#{id}/",
         from: (message[:name] || message[:from]).to_s.fix_encoding,
         date: message['Date'] || '',
-        subject: message['Subject'],
+        subject: (message['Subject'] || (empty)).to_s.fix_encoding,
         status: message[:status]
       }
       if message[:secmail]
diff --git a/www/secretary/workbench/views/body.html.rb 
b/www/secretary/workbench/views/body.html.rb
index 0bd5c9d9..8ee26f99 100644
--- a/www/secretary/workbench/views/body.html.rb
+++ b/www/secretary/workbench/views/body.html.rb
@@ -33,7 +33,7 @@ _html do
 
     _tr do
       _td 'Subject:'
-      _td @message.subject || '(empty)'
+      _td (@message.subject || '(empty)').to_s.fix_encoding
     end
   end
 

Reply via email to