Add htmlentities to Exercice Title to avoid HTML issues

The title of an exercice is not made to have special design or html feature.
It is a title.
If the title of the exercice is
Example of <div> use
The text to display is this one, with html tags displayed as text
1.9.x
Hubert Borderiou 12 years ago
parent 272cc51490
commit 4f0a911d5b
  1. 2
      main/exercice/exercise.class.php

@ -1229,7 +1229,7 @@ class Exercise {
*/
function processCreation($form, $type='') {
$this->updateTitle($form->getSubmitValue('exerciseTitle'));
$this->updateTitle(htmlentities($form->getSubmitValue('exerciseTitle')));
$this->updateDescription($form->getSubmitValue('exerciseDescription'));
$this->updateAttempts($form->getSubmitValue('exerciseAttempts'));
$this->updateFeedbackType($form->getSubmitValue('exerciseFeedbackType'));

Loading…
Cancel
Save