feat: initial commit
This commit is contained in:
commit
e214116e40
253 changed files with 17406 additions and 0 deletions
14
api/Utils/media.php
Normal file
14
api/Utils/media.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
function sanitizeMediaString(string $str): string
|
||||
{
|
||||
$sanitizedString = preg_replace(
|
||||
"/[^a-zA-Z0-9\s-]/",
|
||||
"",
|
||||
iconv("UTF-8", "ASCII//TRANSLIT", $str)
|
||||
);
|
||||
|
||||
return strtolower(
|
||||
trim(preg_replace("/[\s-]+/", "-", $sanitizedString), "-")
|
||||
);
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue