Replace invalid character in ID

This commit is contained in:
nemunaire 2014-11-21 22:44:54 +01:00
parent 87c4275ba9
commit 80a0396500

View File

@ -40,7 +40,7 @@ if ($SESS->level > 1)
{
$ex = new Exercice();
$ex->id = $element->getAttribute("id");
$ex->id = preg_replace("/[^a-zA-Z0-9_]/g", "_", $element->getAttribute("id"));
$ex->level = $element->getAttribute("level");
if ($element->hasAttribute("depends"))
$ex->require = $element->getAttribute("depends");