[svn r12089] ugly fix to avoid errors with ' and " : http://projects.dokeos.com/?do=details&id=1432

skala
Julian Prud'homme 18 years ago
parent f3040cab6c
commit 0638290d75
  1. 16
      main/survey/question.php

@ -21,7 +21,7 @@
* @package dokeos.survey
* @author unknown, the initial survey that did not make it in 1.8 because of bad code
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
* @version $Id: question.php 11685 2007-03-25 21:14:55Z pcool $
* @version $Id: question.php 12089 2007-04-23 14:53:48Z elixir_julian $
*/
// name of the language file that needs to be included
@ -113,6 +113,20 @@ if (!$_POST['save_question'])
// an action has been performed (for instance adding a possible answer, moving an answer, ...)
if ($_POST)
{
while(list($key,$val) = each($_POST))
{
if(is_string($val))
$_POST[$key] = htmlentities(stripslashes($val));
else if (is_array($val))
{
while(list($key2,$val2) = each($val))
{
if(is_string($val2))
$val[$key2] = htmlentities(stripslashes($val2));
}
$_POST[$key] = $val;
}
}
$form_content = $_POST;
$form_content = $form->handle_action($form_content);
}

Loading…
Cancel
Save