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 b18b16f  Fix up invalid UTF-8 characters
b18b16f is described below

commit b18b16f8c5ef14b80baa392b2cf0c26bde5d1197
Author: Sebb <[email protected]>
AuthorDate: Fri Feb 12 14:17:26 2021 +0000

    Fix up invalid UTF-8 characters
---
 www/members/nominations.cgi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index f8a0d2c..e9c6e91 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -37,7 +37,9 @@ def setup_data(cur_mtg_dir)
   end
 
   # parse nominations for names and ids
+  # TODO: share code with nominees.rb if possible
   nominations = IO.read(File.join(cur_mtg_dir, 'nominated-members.txt')).
+    encode("utf-8", "utf-8", :invalid => :replace).
     scan(/^---+--\s+(?:[a-z_0-9-]+)\s+(.*?):?\n/).flatten
 
   nominations.shift if nominations.first == '<empty line>'

Reply via email to