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 5cb080c URI.escape is deprecated
5cb080c is described below
commit 5cb080cf47488846921fba21c9609565dfbeedc1
Author: Sebb <[email protected]>
AuthorDate: Sun Sep 27 14:16:23 2020 +0100
URI.escape is deprecated
---
www/members/nominations.cgi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index 0a86ee1..2956c7e 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -2,6 +2,7 @@
PAGETITLE = "New Member nominations cross-check" # Wvisible:meeting
$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'erb'
require 'mail'
require 'wunderbar/bootstrap'
require 'whimsy/asf'
@@ -127,8 +128,9 @@ _html do
# output an unordered list of subjects linked to the message archive
_ul emails do |mail|
_li do
+ # ERB::Util.url_encode changes space to %20 as required in the
path component
href = MBOX + mail.date.strftime('%Y%m') + '.mbox/' +
- URI.escape('<' + mail.message_id + '>')
+ ERB::Util.url_encode('<' + mail.message_id + '>')
if nominees.any? {|name| mail.subject =~ /\b#{name}\b/i}
_a.present mail.subject, href: href
@@ -148,7 +150,7 @@ end
_json do
_ reports do |mail| # TODO: reports is not defined
_subject mail.subject
- _link MBOX + URI.escape('<' + mail.message_id + '>')
+ _link MBOX + ERB::Util.url_encode('<' + mail.message_id + '>') # TODO
looks wrong: does not agree with href above
_missing missing.any? {|title| mail.subject.downcase =~ /\b#{title}\b/}
end
end