whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Need to decode URI e.g. for encoded spaces
Date Fri, 29 Nov 2019 10:41:27 GMT
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 4c1a789  Need to decode URI e.g. for encoded spaces
4c1a789 is described below

commit 4c1a7891111cc1b20e604373c8d2b4903718014e
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Nov 29 10:41:09 2019 +0000

    Need to decode URI e.g. for encoded spaces
---
 www/secretary/workbench/views/actions/parse-icla.json.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/secretary/workbench/views/actions/parse-icla.json.rb b/www/secretary/workbench/views/actions/parse-icla.json.rb
index d07162f..f5b7a82 100644
--- a/www/secretary/workbench/views/actions/parse-icla.json.rb
+++ b/www/secretary/workbench/views/actions/parse-icla.json.rb
@@ -3,10 +3,12 @@
 require_relative '../../../iclaparser'
 require_relative '../../models/mailbox'
 
-if @attachment.end_with? '.pdf'
+attachment = URI.decode(@attachment) # derived from a URI
+
+if attachment.end_with? '.pdf'
   message = Mailbox.find(@message)
   
-  path = message.find(@attachment).as_file.path
+  path = message.find(attachment).as_file.path
   
   parsed = ICLAParser.parse(path)
 else


Mime
View raw message