Fix student answers with html entities - refs BT#12630

pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
parent e710e460e9
commit f74cecbf83
  1. 1
      main/exercise/fill_blanks.class.php

@ -1333,6 +1333,7 @@ class FillBlanks extends Question
$answer = htmlentities(api_utf8_encode($answer), ENT_QUOTES);
$answer = str_replace(''', ''', $answer); // fix apostrophe
$answer = api_preg_replace('/\s\s+/', ' ', $answer); // replace excess white spaces
$answer = strtr($answer, array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES)));
return trim($answer);
}

Loading…
Cancel
Save