mirror of
https://github.com/danbee/myimages
synced 2025-03-04 08:39:09 +00:00
Fixed issue with filenames containing interesting characters like '&'.
This commit is contained in:
parent
54e2e03835
commit
c7c0034ec0
@ -30,9 +30,9 @@
|
|||||||
while (($file = readdir($dir)) !== false) {
|
while (($file = readdir($dir)) !== false) {
|
||||||
$filetype = substr($file, -3);
|
$filetype = substr($file, -3);
|
||||||
if (preg_match('/(png|gif|jpe?g)/i', $filetype)) {
|
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 '<li><div class="image">' .
|
echo '<li><div class="image">' .
|
||||||
'<a class="imagedel" href="?action=del&image='.$file.'"></a>' .
|
'<a class="imagedel" href="?action=del&image='.urlencode($file).'"></a>' .
|
||||||
'<a rel="userimages" class="imagelink" href="'.$imageurl.'&size=600" title="'.htmlentities($imageurl).'">' .
|
'<a rel="userimages" class="imagelink" href="'.$imageurl.'&size=600" title="'.htmlentities($imageurl).'">' .
|
||||||
'<img src="', $imageurl, '&size=96" />' .
|
'<img src="', $imageurl, '&size=96" />' .
|
||||||
'</a>' .
|
'</a>' .
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user