diff --git a/home/classes/StructureManager.class.php b/home/classes/StructureManager.class.php
index d67ef1f6..48633dd6 100644
--- a/home/classes/StructureManager.class.php
+++ b/home/classes/StructureManager.class.php
@@ -256,7 +256,7 @@ function printStruct($array, $folder) {
$this->insertIcons($min, $i);
if($this->isFolder($page)) {
-
+ $name = preg_replace('/\s/', '_', $name); // To accommodate folder names with spaces
echo '
';
$this->printStruct($page->children(), $i);
@@ -312,7 +312,7 @@ function initContentMenu() {
};
';
-
+ $page = preg_replace('/\s/', '_', $page); // To accommodate folder names with spaces
echo '
';
echo '';
echo '';
@@ -384,7 +384,7 @@ function createStruct($page_temp, $id_folder, $course_id) {
$body = $this->getBody($page);
- $title = $page['name'];
+ $title = htmlspecialchars($page['name']);
if($id_folder == -1) {
$content_id = $contentDAO->Create($course_id, 0, 1, 0, 1, null, null, $title, $body, null, 0, null, $content_type);