Path decoded and sent to html page
authorsaksham1115 <saksham115@gmail.com>
Mon, 13 Jun 2016 06:47:32 +0000 (06:47 +0000)
committersaksham1115 <saksham115@gmail.com>
Tue, 19 Jul 2016 17:29:08 +0000 (17:29 +0000)
mediagoblin/edit/views.py

index b3f4318b4c977f9e846b5306a2281ab5756a472a..ba727b07b61ca69e9674e1aa16ccbb9dcf0852bb 100644 (file)
@@ -584,7 +584,15 @@ def edit_metadata(request, media):
 @require_active_login
 @path_subtitle
 def custom_subtitles(request,path=None):
-    path = path.encode('ascii','ignore')[1:-1]
+    path = path.encode('ascii','ignore')[1:-1].split(',')
+    for index in range(0,len(path)):
+        path[index] = path[index].encode('utf8')
+        path[index] = path[index].strip()
+        path[index] = path[index][2:-1]
+    temp = path[0]
+    for index in range(1,len(path)):
+        temp = temp + "/" + path[index]
+    path = temp
     return render_to_response(
         request,
         "mediagoblin/user_pages/custom_subtitles.html",