diff --git a/index.php b/index.php index 4119556..4a0c254 100644 --- a/index.php +++ b/index.php @@ -29,6 +29,19 @@ function reduzirArk($tamanho, $pedacos) { } +function limpar_ark($str){ + + // Lista de caracteres a serem removidos + $caracteresParaRemover = array('<', '>', ':', ';', '(', ')', '&', '$'); + + // Substitui os caracteres da lista por uma string vazia + $stringLimpa = str_replace($caracteresParaRemover, '', $str); + + return $stringLimpa; + +} + + function direcionar_ark() { $pasta_json = "json"; //Substitua pelo nome que vc escolheu para colocar os metadados ARK em JSON @@ -51,6 +64,9 @@ function direcionar_ark() { } + //limpar o ARK + $ark = limpar_ark($ark); + //Eliminando espaços em branco no início e no final do $ark $ark = trim($ark);