Replace htmlentities and html_entity_decode with api_... - ref #6933

1.9.x
Hubert Borderiou 11 years ago
parent 4ada8037b2
commit 520119c605
  1. 4
      main/exercice/admin.php
  2. 4
      main/exercice/exercise.class.php

@ -279,9 +279,9 @@ if (!empty($gradebook) && $gradebook=='view') {
$interbreadcrumb[] = array("url" => "exercice.php","name" => get_lang('Exercices'));
if (isset($_GET['newQuestion']) || isset($_GET['editQuestion']) ) {
$interbreadcrumb[] = array("url" => "admin.php?exerciseId=".$objExercise->id, "name" => html_entity_decode($objExercise->name));
$interbreadcrumb[] = array("url" => "admin.php?exerciseId=".$objExercise->id, "name" => $objExercise->name);
} else {
$interbreadcrumb[] = array("url" => "#", "name" => html_entity_decode($objExercise->name));
$interbreadcrumb[] = array("url" => "#", "name" => $objExercise->name);
}
// shows a link to go back to the question pool

@ -1169,7 +1169,7 @@ class Exercise {
$defaults['randomAnswers'] = $this->selectRandomAnswers();
$defaults['exerciseType'] = $this->selectType();
$defaults['exerciseTitle'] = html_entity_decode($this->selectTitle());
$defaults['exerciseTitle'] = api_html_entity_decode($this->selectTitle());
$defaults['exerciseDescription'] = $this->selectDescription();
$defaults['exerciseAttempts'] = $this->selectAttempts();
$defaults['exerciseFeedbackType'] = $this->selectFeedbackType();
@ -1250,7 +1250,7 @@ class Exercise {
*/
function processCreation($form, $type = '')
{
$this->updateTitle(htmlentities($form->getSubmitValue('exerciseTitle')));
$this->updateTitle(api_htmlentities($form->getSubmitValue('exerciseTitle')));
$this->updateDescription($form->getSubmitValue('exerciseDescription'));
$this->updateAttempts($form->getSubmitValue('exerciseAttempts'));
$this->updateFeedbackType($form->getSubmitValue('exerciseFeedbackType'));

Loading…
Cancel
Save