From c7c0034ec0a3c7b1482f00223f951a729f2bc639 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Mon, 29 Mar 2010 10:42:47 +0100 Subject: [PATCH] Fixed issue with filenames containing interesting characters like '&'. --- images/images.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/images.php b/images/images.php index 5c7b2bc..8bc7fe9 100644 --- a/images/images.php +++ b/images/images.php @@ -30,9 +30,9 @@ while (($file = readdir($dir)) !== false) { $filetype = substr($file, -3); if (preg_match('/(png|gif|jpe?g)/i', $filetype)) { - $imageurl = $prot . '://' . $host . $root . '/image.php?user=' . $user . '&image=' . $file; + $imageurl = $prot . '://' . $host . $root . '/image.php?user=' . $user . '&image=' . urlencode($file); echo '
  • ' . - '' . + '' . '' . '' . '' .