Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replaced spaces with underscores for ids of folders associated struct…
…ure preview div
  • Loading branch information
gregrgay committed Feb 2, 2016
1 parent 086c00f commit fd0fd8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions home/classes/StructureManager.class.php
Expand Up @@ -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 '<div style="margin-left: 15px; display: none;" id="folder_'.$name.$i.'" >';
$this->printStruct($page->children(), $i);

Expand Down Expand Up @@ -312,7 +312,7 @@ function initContentMenu() {
};
</script>
';

$page = preg_replace('/\s/', '_', $page); // To accommodate folder names with spaces
echo '<a href="javascript:void(0)" onclick="javascript: trans.utility.toggleFolderStruct(\''.$i.'\', \''.$page.'\', \''._AT('expand').'\', \''._AT('collapse').'\', \''.$tree_expand_icon.'\', \''.$tree_collapse_icon.'\' ); ">';
echo '<img id="tree_icon_'.$page.$i.'" style="margin-left: 1px;" class="img-size-tree" width="16" height="16" border="0" title="'.$value.'" alt="'.$value.'" src="'.TR_BASE_HREF.'images/tree/tree_'.$value.'.gif">';
echo '</a>';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit fd0fd8c

Please sign in to comment.