Skip to content

Commit

Permalink
MDL-51375 excel output: more work to avoid invalid sheet names
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Oct 6, 2015
1 parent 6d9b426 commit 693f5ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/excellib.class.php
Expand Up @@ -160,7 +160,7 @@ class MoodleExcelWorksheet {
*/
public function __construct($name, PHPExcel $workbook) {
// Replace any characters in the name that Excel cannot cope with.
$name = strtr($name, '[]*/\?:', ' ');
$name = strtr(trim($name, "'"), '[]*/\?:', ' ');
// Shorten the title if necessary.
$name = core_text::substr($name, 0, 31);

Expand Down

0 comments on commit 693f5ef

Please sign in to comment.