]> git.plutz.net Git - serve0/commitdiff
escape & character in video url
authorpaul <paul@plutz.net>
Wed, 12 Nov 2014 18:48:05 +0000 (18:48 +0000)
committerpaul <paul@plutz.net>
Wed, 12 Nov 2014 18:48:05 +0000 (18:48 +0000)
svn path=/trunk/; revision=23

pages/videoview.sh

index fe70493a6664e00dc50484712ff6d26a84f0155b..d05c519d3d1e50d003d67a0253f8639a620f13eb 100755 (executable)
@@ -90,7 +90,7 @@ _printVideo(){
     [ -r "$meta" ] || ". ${_EXEC}/helpers/genmeta.sh" "$video" "$meta"
     [ -r "$thumb" ] || ". ${_EXEC}/helpers/genthumb.sh" "$video" "$thumb"
     [ -L "$mpfake" ] || ln -s "../videos/$info" "$mpfake"
-    video="$(echo "videos/$info" |sed 's/\?/\%6F/g')"
+    video="$(echo "videos/$info" |sed 's/\?/\%6F/g;s/&/\%26/g')"
     thumb="$(echo "thumbs/$info.jpg" |sed 's/\?/%6F/g')"
     mpfake="$(echo "$info" |sed -r 's:^(.*)\.[a-zA-Z0-9]{3,4}$:mp4/\1.mp4:' |sed 's/\?/%6F/g')"