]> git.plutz.net Git - serve0/commitdiff
enable video filenames containing ampersand
authorpaul <paul@plutz.net>
Mon, 22 Sep 2014 00:32:46 +0000 (00:32 +0000)
committerpaul <paul@plutz.net>
Mon, 22 Sep 2014 00:32:46 +0000 (00:32 +0000)
svn path=/trunk/; revision=14

actions/watch.sh
pages/videoview.sh
templates/videoview.css.sh

index cd1dd14105ae7bf4a845ca0835d3bc19b28efccd..65bfecd981215062de7e444894b46a2e232d990e 100755 (executable)
@@ -8,7 +8,7 @@ filter="$_REF[\"f\"]"
 page="$_REF[\"p\"]"
 
 watch_link=''
-[ -n "$info" ]   && watch_link="${watch_link}i=${info}&"
+[ -n "$info" ]   && watch_link="i=$(echo -n "${info}" |sed -r 's:%:%25:g;s:\&:%26:g;')&"
 [ -n "$order" ]  && watch_link="${watch_link}o=${order}&"
 [ -n "$search" ] && watch_link="${watch_link}s=${search}&"
 [ -n "$filter" ] && watch_link="${watch_link}f=${filter}&"
index ac3532b4f6349b717b0df290c27a5156d93a114d..6f418f05f7d9086d6990abcf06762cdeea8cde93 100755 (executable)
@@ -25,7 +25,7 @@ page=$(echo "$_GET[\"p\"]" |egrep '^[0-9]+$')
 [ -z "$page" ] && page=0
 
 page_link=''
-[ -n "$info" ]   && page_link="${page_link}i=${info}&"
+[ -n "$info" ]   && page_link="i=$(echo -n "$info" |sed -r 's:%:%25:g;s:\&:%26:g;')&"
 [ -n "$order" ]  && page_link="${page_link}o=${order}&"
 [ -n "$search" ] && page_link="${page_link}s=${search}&"
 [ -n "$filter" ] && page_link="${page_link}f=${filter}&"
@@ -98,9 +98,10 @@ _printVideo(){
       minutes="$(($length / 60)):0$(($length % 60))" ||\
       minutes="$(($length / 60)):$(($length % 60))"
 
+    linkinfo="$(echo -n "$info" |sed -r 's:%:%25:g;s:\&:%26:g;')"
     tee "$cache" <<VIDEOend
       <div class="thumb">
-        <a class="watchlink" name="$info" href="?action=watch&i=$info">
+        <a class="watchlink" name="$linkinfo" href="?action=watch&i=$linkinfo">
           <img src="$thumb">
         </a>
         <a class="videolink" href="$video">$info</a>
index b2389989e7d96f893eb49d5324f15eaefbfb6d27..08d5a81faf524475321608233d78108a342bfb5b 100755 (executable)
@@ -94,6 +94,10 @@ a.clearsearch, a.advanced, a.tagger, .pagination_nav {
   display: block
 }
 
+#thumblist {
+  padding: .5em 0 3em 0;
+}
+
 #thumblist .thumb {
   display: inline-block;
   width: 212px;