Permalink
Browse files

use clean_filename for filename of text file download

  • Loading branch information...
1 parent 47edd30 commit c5e66883ed1a8ed91369f23c9f08de4cd8c1d32b gbateson committed Jan 17, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/hotpot/report/default.php
@@ -544,8 +544,9 @@ function print_text_report(&$course, &$hotpot, &$tables, &$options) {
}
}
function print_text_start(&$course, &$hotpot, &$options) {
+ $downloadfilename = clean_filename("$course->shortname $hotpot->name.txt");
header("Content-Type: application/download\n");
- header("Content-Disposition: attachment; filename=$course->shortname-$hotpot->name.txt");
+ header("Content-Disposition: attachment; filename=$downloadfilename");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");

0 comments on commit c5e6688

Please sign in to comment.