Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #331 opened Oct 08, 2014 by Bach Dániel@bachdaniel 
  • Report abuse
  • New issue
Report abuse New issue

encode urls in StoreList template

diff --git a/circle/dashboard/templates/dashboard/store/_list-box.html b/circle/dashboard/templates/dashboard/store/_list-box.html
index 412717b..38a02b0 100644
--- a/circle/dashboard/templates/dashboard/store/_list-box.html
+++ b/circle/dashboard/templates/dashboard/store/_list-box.html
@@ -4,7 +4,7 @@
   <div class="list-group-item">
     <div class="row">
       <div class="col-sm-6">
-        <a href="{% url "dashboard.views.store-upload"%}?directory={{ current }}"
+        <a href="{% url "dashboard.views.store-upload"%}?directory={{ current|urlencode }}"
           class="btn btn-info btn-xs js-hidden">
           {% trans "Upload" %}
         </a>
@@ -33,12 +33,12 @@
       </div><!-- .col-sm-6 upload -->

       <div class="col-sm-6">
-        <a href="{% url "dashboard.views.store-remove" %}?path={{ current }}" 
+        <a href="{% url "dashboard.views.store-remove" %}?path={{ current|urlencode }}"
           class="btn btn-danger btn-xs pull-right store-action-button" 
           title="{% trans "Remove directory" %}">
           <i class="fa fa-times"></i>
         </a>
-        <a href="{% url "dashboard.views.store-download" %}?path={{ current }}" 
+        <a href="{% url "dashboard.views.store-download" %}?path={{ current|urlencode }}"
           class="btn btn-primary btn-xs pull-right store-action-button" 
           title="{% trans "Download directory" %}">
           <i class="fa fa-cloud-download"></i>
@@ -64,7 +64,7 @@
 </div><!-- .list-group -->

 <div class="list-group" id="store-list-list">
-  <a href="{% url "dashboard.views.store-list" %}?directory={{ up_url }}" 
+  <a href="{% url "dashboard.views.store-list" %}?directory={{ up_url|urlencode }}"
     class="list-group-item store-list-item" data-item-type="D">
     {% if current == "/" %}
       <div class="store-list-item-icon">
@@ -85,8 +85,8 @@

   {% for f in root %}
   <a class="list-group-item store-list-item" data-item-type="{{ f.TYPE }}"
-    href="{% if f.TYPE == "D" %}{% url "dashboard.views.store-list" %}?directory={{ f.path }}{% else %}
-    {% url "dashboard.views.store-download" %}?path={{ f.path }}{% endif %}"
+    href="{% if f.TYPE == "D" %}{% url "dashboard.views.store-list" %}?directory={{ f.path|urlencode }}{% else %}
+    {% url "dashboard.views.store-download" %}?path={{ f.path|urlencode }}{% endif %}"
     >
     <div class="store-list-item-icon">
       <i class="
@@ -122,12 +122,12 @@
         </dl>
       </div>
       <div class="col-sm-2" style="text-align: right;">
-        <a href="{% url "dashboard.views.store-download" %}?path={{ f.path }}" 
+        <a href="{% url "dashboard.views.store-download" %}?path={{ f.path|urlencode }}"
           class="btn btn-primary btn-sm store-download-button">
           <i class="fa fa-download"></i>
           {% trans "Download" %}
         </a>
-        <a href="{% url "dashboard.views.store-remove" %}?path={{ f.path }}" 
+        <a href="{% url "dashboard.views.store-remove" %}?path={{ f.path|urlencode }}"
           class="btn btn-danger btn-xs store-remove-button">
           <i class="fa fa-times"></i>
           {% trans "Remove" %}
  • Bach Dániel @bachdaniel

    Reassigned to @kviktor

    Oct 13, 2014

    Reassigned to @kviktor

    Reassigned to @kviktor
    Toggle commit list
  • Kálmán Viktor @kviktor

    mentioned in merge request !250 (merged)

    Oct 17, 2014

    mentioned in merge request !250 (merged)

    mentioned in merge request !250
    Toggle commit list
  • Kálmán Viktor @kviktor

    Status changed to closed

    Oct 20, 2014

    Status changed to closed

    Status changed to closed
    Toggle commit list
  • Bach Dániel @bachdaniel

    mentioned in commit 542bbd0a

    Feb 23, 2015

    mentioned in commit 542bbd0a

    mentioned in commit 542bbd0ac9bfa55a1fc3b53ef567b04a90251516
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
October
Milestone
October
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: circle/cloud#331