mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-06 05:07:49 +02:00
Monstra automatically rename files Issue #231
This commit is contained in:
@@ -119,7 +119,7 @@ class Security
|
||||
{
|
||||
// Redefine vars
|
||||
$str = (string) $str;
|
||||
$delimiter = (string) $delimiter;
|
||||
$delimiter = $delimiter;
|
||||
$lowercase = (bool) $lowercase;
|
||||
$delimiter = $delimiter;
|
||||
|
||||
@@ -149,9 +149,9 @@ class Security
|
||||
$str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
|
||||
|
||||
// Remove characters
|
||||
$str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str );
|
||||
$str = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $str);
|
||||
if ($delimiter != null) {
|
||||
$str = preg_replace("/[\/_|+ -]+/", $delimiter, $str );
|
||||
$str = preg_replace("/[\/_|+ -]+/", $delimiter, $str);
|
||||
$str = trim($str, $delimiter);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user