mirror of
https://github.com/e107inc/e107.git
synced 2025-03-13 17:09:46 +01:00
Fix regex for ID generation
This commit is contained in:
parent
161bbe4785
commit
0122e71cab
@ -845,8 +845,9 @@ class e_form
|
||||
|
||||
//format data first
|
||||
$name = trim($this->name2id($name), '-');
|
||||
$value = trim(preg_replace('#[^a-z0-9\-]/i#','-', $value), '-');
|
||||
$value = trim(str_replace("/","-",$value), '-');
|
||||
$value = trim(preg_replace('#[^a-zA-Z0-9\-]#','-', $value), '-');
|
||||
//$value = trim(preg_replace('#[^a-z0-9\-]#/i','-', $value), '-'); // This should work - but didn't for me!
|
||||
$value = trim(str_replace("/","-",$value), '-'); // Why?
|
||||
if(!$id_value && is_numeric($value)) $id_value = $value;
|
||||
|
||||
// clean - do it better, this could lead to dups
|
||||
|
Loading…
x
Reference in New Issue
Block a user