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 8f71496 URI.escape is deprecated
8f71496 is described below
commit 8f7149645d23b9c5a5125989b59f8fcc8651c2ea
Author: Sebb <[email protected]>
AuthorDate: Sun Sep 27 14:26:16 2020 +0100
URI.escape is deprecated
ERB::Util.url_encode changes space to %20
-- as required in the path component
---
www/board/agenda/views/actions/posted-reports.json.rb | 4 +++-
www/board/posted-reports.cgi | 7 +++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/www/board/agenda/views/actions/posted-reports.json.rb
b/www/board/agenda/views/actions/posted-reports.json.rb
index 1df07a5..582f8de 100755
--- a/www/board/agenda/views/actions/posted-reports.json.rb
+++ b/www/board/agenda/views/actions/posted-reports.json.rb
@@ -4,6 +4,7 @@
#
require 'date'
+require 'erb'
require 'mail'
require 'whimsy/asf/agenda'
@@ -70,7 +71,8 @@ missing = parsed.select {|item| item['missing']}.
# produce output
_ reports do |path, mail|
_subject mail.subject
- _link THREAD + URI.escape('<' + mail.message_id + '>')
+ # ERB::Util.url_encode changes space to %20 as required in the path component
+ _link THREAD + ERB::Util.url_encode('<' + mail.message_id + '>')
_path path
subject = mail.subject.downcase
diff --git a/www/board/posted-reports.cgi b/www/board/posted-reports.cgi
index c8be930..2aa2034 100755
--- a/www/board/posted-reports.cgi
+++ b/www/board/posted-reports.cgi
@@ -2,6 +2,7 @@
PAGETITLE = "Posted Board Report Crosscheck" # Wvisible:board
$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'erb'
require 'wunderbar'
require 'wunderbar/bootstrap'
require 'wunderbar/jquery'
@@ -89,7 +90,8 @@ _html do
report_mails.each do |mail|
_tr do
_td do
- href = THREAD + URI.escape('<' + mail.message_id + '>')
+ # ERB::Util.url_encode changes space to %20 as required in the
path component
+ href = THREAD + ERB::Util.url_encode('<' + mail.message_id + '>')
if missing.any? {|title| mail.subject.downcase =~
/\b#{title}\b/}
_td do
_a.missing mail.subject, href: href
@@ -109,10 +111,11 @@ _html do
end
# produce JSON output of reports
+# N.B. This is activated if the ACCEPT header references 'json'
_json do
_ report_mails do |mail|
_subject mail.subject
- _link THREAD + URI.escape('<' + mail.message_id + '>')
+ _link THREAD + ERB::Util.url_encode('<' + mail.message_id + '>')
subject = mail.subject.downcase
_missing missing.any? {|title| subject =~ /\b#{title}\b/}