Amend previous commit using api_ functions to avoid encoding issue - refs BT#7164

1.9.x
Yannick Warnier 11 years ago
parent 4cb73f160e
commit ab24a64a28
  1. 6
      main/exercice/exercise.class.php

@ -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();
@ -1212,7 +1212,7 @@ class Exercise {
$defaults['pass_percentage'] = '';
}
} else {
$defaults['exerciseTitle'] = html_entity_decode($this->selectTitle());
$defaults['exerciseTitle'] = api_html_entity_decode($this->selectTitle());
$defaults['exerciseDescription'] = $this->selectDescription();
}
if (api_get_setting('search_enabled') === 'true') {
@ -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