myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3391] branches/wf4ever/app: some quick URI escap


From: noreply
Subject: [myexperiment-hackers] [3391] branches/wf4ever/app: some quick URI escaping fixes - but not certain about these
Date: Fri, 1 Feb 2013 09:53:56 +0000 (UTC)

Revision
3391
Author
dgc
Date
2013-02-01 09:53:55 +0000 (Fri, 01 Feb 2013)

Log Message

some quick URI escaping fixes - but not certain about these

Modified Paths

Diff

Modified: branches/wf4ever/app/controllers/packs_controller.rb (3390 => 3391)


--- branches/wf4ever/app/controllers/packs_controller.rb	2013-01-31 13:50:03 UTC (rev 3390)
+++ branches/wf4ever/app/controllers/packs_controller.rb	2013-02-01 09:53:55 UTC (rev 3391)
@@ -133,7 +133,7 @@
 
     session = ROSRS::Session.new(@pack.ro_uri, Conf.rodl_bearer_token)
 
-    session.delete_resource(@pack.ro_uri + params[:resource_path])
+    session.delete_resource(@pack.ro_uri + URI.encode(params[:resource_path]))
 
     render(:partial => "items", :locals => { :pack => @pack, :authorised_to_edit => @authorised_to_edit })
   end

Modified: branches/wf4ever/app/views/packs/resource_show.rhtml (3390 => 3391)


--- branches/wf4ever/app/views/packs/resource_show.rhtml	2013-01-31 13:50:03 UTC (rev 3390)
+++ branches/wf4ever/app/views/packs/resource_show.rhtml	2013-02-01 09:53:55 UTC (rev 3391)
@@ -12,8 +12,8 @@
   <ul class="sectionIcons" style="margin-top: 0.7em; margin-bottom: 0.6em;">
     <% if Authorization.check("edit", @pack, current_user) %>
       <% if @pack.ro_uri %>
-        <li><%= icon('edit', pack_resource_edit_path(@pack, params[:resource_path]), nil, nil, "Edit Annotations") %></li>
-        <li><%= icon('new', pack_resource_reupload_path(@pack, params[:resource_path]), nil, nil, "Upload New Version") %></li>
+        <li><%= icon('edit', "#{pack_resources_path(@pack)}/#{params[:resource_path]};edit", nil, nil, "Edit Annotations") %></li>
+        <li><%= icon('new',  "#{pack_resources_path(@pack)}/#{params[:resource_path]};new_version", nil, nil, "Upload New Version") %></li>
       <% end %>
     <% end %>
   </ul>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]