You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/11/29 10:41:27 UTC
[whimsy] branch master updated: Need to decode URI e.g. for encoded
spaces
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 <se...@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