preg_replace to eliminate bad character

This commit is contained in:
Michael RICOIS 2012-06-20 06:56:46 +00:00
parent 1ffa5eebf1
commit a3651c6ad7

View File

@ -90,6 +90,8 @@ class ComptageController extends Zend_Controller_Action
require_once 'i18n/cleanchar.php';
$ref = str_replace(' ', '_', $ref);
$ref = cleanutf8($ref);
$pattern = '/[^a-zA-Z0-9_]+/';
$ref = preg_replace($pattern, '', $ref);
if (empty($ref)) {
echo json_encode(array(