MDL-51375 excel output: more work to avoid invalid sheet names

This commit is contained in:
Tim Hunt
2015-10-06 05:45:16 +01:00
parent dc3850fc20
commit e8da65449a
+1 -1
View File
@@ -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);