diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-08-05 16:45:43 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-08-05 16:45:43 +0100 |
commit | 6e40e841bcf21fb80bd8432baeaf8def494e8af6 (patch) | |
tree | 504175b5763b7202a5ce9e2cdaf5f79733a16a2c | |
parent | 1bdbbed4aa1c9149ed49f7a8329060fefb9e0384 (diff) |
Ensure that URLs are correctly encoded
-rw-r--r-- | index.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -295,7 +295,7 @@ for ($i = 0; $i < count($listing); $i++) { $spaces = $spaces . " "; } - echo '<img src="/icons/' . $listing[$i]['type'] . '.gif" alt="[IMG]"> <a href="' . $listing[$i]['filename'] . '">' . $preview . '</a>' . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . ' ' . size_readable($listing[$i]['size'], null, "bi") . ' ' . "\n"; + echo '<img src="/icons/' . $listing[$i]['type'] . '.gif" alt="[IMG]"> <a href="' . rawurlencode($listing[$i]['filename']) . '">' . $preview . '</a>' . $spaces . date("d-M-Y H:i", $listing[$i]['modified']) . ' ' . size_readable($listing[$i]['size'], null, "bi") . ' ' . "\n"; } ?> <hr></pre> @@ -317,7 +317,7 @@ for ($i = 0; $i < count($listing); $i++) { } } else if ($_GET['format'] == "light") { for ($i = 0; $i < count($listing); $i++) { - echo '<a href="' . $listing[$i]['filename'] . '">' . $listing[$i]['filename'] . '</a><br>'; + echo '<a href="' . rawurlencode($listing[$i]['filename']) . '">' . $listing[$i]['filename'] . '</a><br>'; } } ?> |