From 6099e982abeb5caf8944429a4a4f152acec9f946 Mon Sep 17 00:00:00 2001 From: Alda Marteau-Hardi Date: Mon, 24 Nov 2014 20:43:39 +0100 Subject: [PATCH] Slashes unescaping seemed overcomplicated. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 8ee577b..7224dd3 100644 --- a/index.php +++ b/index.php @@ -289,7 +289,7 @@ $dirs = array(); if (is_file($currentdir.'/'.$file.'.html')) { $img_captions[$file] = $file.'::'.htmlspecialchars(file_get_contents($currentdir.'/'.$file.'.html'),ENT_QUOTES); } - $linkUrl = join("/", array_merge(array_map(rawurlencode, split("/", $currentdir)), array(rawurlencode($file)))); + $linkUrl = str_replace('%2F', '/', rawurlencode("$currentdir/$file")); $imgParams = http_build_query( array( 'filename' => "$thumbdir/$file",