fix #6985 Using < or > in a "fill blanks" answer does not work

1.9.x
eric 12 years ago
parent 734bfcb8fd
commit d16c0f43a6
  1. 3
      main/exercice/exercise.class.php
  2. 3
      main/exercice/fill_blanks.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

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

Loading…
Cancel
Save