diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 51103d8096..cb046e5a1d 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -876,6 +876,7 @@ class Display public static function url($name, $url, $attributes = array()) { if (!empty($url)) { + $url = preg_replace('#&#', '&', $url); $url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8'); $attributes['href'] = $url; } diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 993b460b9e..141b52db91 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3182,9 +3182,9 @@ class learnpath if ($this->get_lp_session_id() == api_get_session_id()) { $html .= '
'; $html .= '
'; - $html .= "" . get_lang('Overview') . ""; - $html .= "" . get_lang('Edit') . ""; - $html .= 'lp_id.'">'.get_lang('Settings').''; + $html .= "" . get_lang('Overview') . ""; + $html .= "" . get_lang('Edit') . ""; + $html .= 'lp_id.'">'.get_lang('Settings').''; $html .= '
'; $html .= '
'; } @@ -5448,7 +5448,7 @@ class learnpath // we need to start a form when we want to update all the mp3 files if ($update_audio == 'true') { - $return .= '
'; + $return .= ''; } $return .= '
'; if (count($this->items) == 0) { @@ -5539,7 +5539,7 @@ class learnpath //Link for the documents if ($arrLP[$i]['item_type'] == 'document') { - $url = api_get_self() . '?'.api_get_cidreq().'&action=view_item&mode=preview_document&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id; + $url = api_get_self() . '?'.api_get_cidreq().'&action=view_item&mode=preview_document&id=' . $arrLP[$i]['id'] . '&lp_id=' . $this->lp_id; $title_cut = Display::url($title_cut, $url, array('class' => 'ajax')); } @@ -5610,17 +5610,17 @@ class learnpath // No edit for this item types if (!in_array($arrLP[$i]['item_type'], array('sco', 'asset'))) { if (!in_array($arrLP[$i]['item_type'], array('dokeos_chapter', 'dokeos_module'))) { - $edit_icon .= ''; + $edit_icon .= ''; $edit_icon .= Display::return_icon('edit.png', get_lang('LearnpathEditModule'), array(), ICON_SIZE_TINY); $edit_icon .= ''; } else { - $edit_icon .= ''; + $edit_icon .= ''; $edit_icon .= Display::return_icon('edit.png', get_lang('LearnpathEditModule'), array(), ICON_SIZE_TINY); $edit_icon .= ''; } } - $delete_icon .= ' '; + $delete_icon .= ' '; $delete_icon .= Display::return_icon('delete.png', get_lang('LearnpathDeleteModule'), array(), ICON_SIZE_TINY); $delete_icon .= ''; @@ -5757,17 +5757,17 @@ class learnpath { $gradebook = isset($_GET['gradebook']) ? Security :: remove_XSS($_GET['gradebook']) : null; $return = '
'; - $return .= '' . Display :: return_icon('preview_view.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).' '; - $return .= '' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).''; - $return .= '' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).''; + $return .= '' . Display :: return_icon('preview_view.png', get_lang('Display'),'',ICON_SIZE_MEDIUM).' '; + $return .= '' . Display :: return_icon('upload_audio.png', get_lang('UpdateAllAudioFragments'),'',ICON_SIZE_MEDIUM).''; + $return .= '' . Display :: return_icon('settings.png', get_lang('CourseSettings'),'',ICON_SIZE_MEDIUM).''; $buttons = array( array( 'title' => get_lang('SetPrerequisiteForEachItem'), - 'href' => 'lp_controller.php?'.api_get_cidreq().'&action=set_previous_step_as_prerequisite&lp_id=' . $_SESSION['oLP']->lp_id, + 'href' => 'lp_controller.php?'.api_get_cidreq().'&action=set_previous_step_as_prerequisite&lp_id=' . $_SESSION['oLP']->lp_id, ), array( 'title' => get_lang('ClearAllPrerequisites'), - 'href' => 'lp_controller.php?'.api_get_cidreq().'&action=clear_prerequisites&lp_id=' . $_SESSION['oLP']->lp_id, + 'href' => 'lp_controller.php?'.api_get_cidreq().'&action=clear_prerequisites&lp_id=' . $_SESSION['oLP']->lp_id, ), ); $return .= Display::group_button(get_lang('PrerequisitesOptions'), $buttons); @@ -5844,7 +5844,7 @@ class learnpath unset ($this->arrMenu); for ($i = 0; $i < count($arrLP); $i++) { $title = addslashes($arrLP[$i]['title']); - $menu_page = api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=view_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $_SESSION['oLP']->lp_id; + $menu_page = api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&action=view_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $_SESSION['oLP']->lp_id; $icon_name = str_replace(' ', '', $arrLP[$i]['item_type']); if (file_exists('../img/lp_' . $icon_name . '.png')) { $return .= "\tm.add(" . $arrLP[$i]['id'] . ", " . $arrLP[$i]['parent_item_id'] . ", '" . $title . "', '" . $menu_page . "', '', '', '../img/lp_" . $icon_name . ".png', '../img/lp_" . $icon_name . ".png');\n"; @@ -8560,7 +8560,7 @@ class learnpath $return .= ' '; $return .= ''; - $return .= ''. + $return .= ''. ((!empty ($row_hot['comment'])) ? $row_hot['comment'] : Security :: remove_XSS($row_hot['title'])) . ''; $return .= ''; } @@ -8571,7 +8571,7 @@ class learnpath $return .= Display::return_icon('move_everywhere.png', get_lang('Move'), array(), ICON_SIZE_TINY); $return .= ' '; $return .= ''; - $return .= '' . + $return .= '' . Security :: remove_XSS(cut($row_quiz['title'], 80)). ''; $return .= ''; @@ -8681,7 +8681,7 @@ class learnpath $return = '
'; $return .= '
'; $return .= ''; - $return .= '' . get_lang('AddAssignmentPage') . ''; + $return .= '' . get_lang('AddAssignmentPage') . ''; $return .= '
'; $return .= '
'; return $return; @@ -8703,7 +8703,7 @@ class learnpath //First add link $return .= '
  • '; $return .= ''; - $return .= '' . get_lang('CreateANewForum') . ''; + $return .= '' . get_lang('CreateANewForum') . ''; $return .= '
  • '; $return .= '