Browse Source

Merge pull request #272 from emarguin/#6985-fill_blanks

#6985 fill blanks
Yannick Warnier 11 years ago
parent
commit
168a7fa7b3
2 changed files with 2 additions and 3 deletions
  1. 2 1
      main/exercice/exercise.class.php
  2. 0 2
      main/exercice/fill_blanks.class.php

+ 2 - 1
main/exercice/exercise.class.php

@@ -2407,7 +2407,8 @@ class Exercise
                             //Needed to let characters ' and " to work as part of an answer
                             $choice[$j] = stripslashes($choice[$j]);
                         } else {
-                            $choice[$j] = trim($choice[$j]);
+							// This value is the user input, not escaped while correct answer is escaped by fckeditor
+							$choice[$j] = htmlentities(trim($choice[$j]));
                         }
 
                         //No idea why we api_strtolower user reponses

+ 0 - 2
main/exercice/fill_blanks.class.php

@@ -162,8 +162,6 @@ class FillBlanks extends Question
 	{
 		global $charset;
 		$answer = $form->getSubmitValue('answer');
-		//Due the fckeditor transform the elements to their HTML value
-		$answer = api_html_entity_decode($answer, ENT_QUOTES, $charset);
 
 		//remove the :: eventually written by the user
 		$answer = str_replace('::','',$answer);