Browse Source

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
Hubert Borderiou 11 years ago
parent
commit
4f0a911d5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/exercice/exercise.class.php

+ 1 - 1
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'));