From 18aa02efdddeef1f86d2b09cdc26b198479f1bf6 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 14 May 2008 05:21:01 +0000 Subject: [PATCH] "MDL-14820, escape filename" --- files/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/index.php b/files/index.php index 7779af9e14f..d7c51c2e373 100644 --- a/files/index.php +++ b/files/index.php @@ -654,7 +654,7 @@ function printfilelist($filelist) { foreach ($filelist as $file) { if (is_dir($basedir.'/'.$file)) { - echo "pixpath/f/folder.gif\" class=\"icon\" alt=\"$strfolder\" /> $file
"; + echo ''. $strfolder .' '. htmlspecialchars($file) .'
'; $subfilelist = array(); $currdir = opendir($basedir.'/'.$file); while (false !== ($subfile = readdir($currdir))) { @@ -666,7 +666,7 @@ function printfilelist($filelist) { } else { $icon = mimeinfo("icon", $file); - echo "pixpath/f/$icon\" class=\"icon\" alt=\"$strfile\" /> $file
"; + echo ''. $strfile .' '. htmlspecialchars($file) .'
'; } } }