preg_replace to eliminate bad character
This commit is contained in:
parent
1ffa5eebf1
commit
a3651c6ad7
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user