You are here

public static function Utils::fixFileName in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

1 call to Utils::fixFileName()
URLDownloader::downloadURL in vendor/edsdk/file-uploader-server-php/src/lib/file/URLDownloader.php

File

vendor/edsdk/file-uploader-server-php/src/lib/file/Utils.php, line 44

Class

Utils

Namespace

EdSDK\FileUploaderServer\lib\file

Code

public static function fixFileName($name) {
  $newName = "";
  for ($i = 0; $i < strlen($name); $i++) {
    $ch = substr($name, $i, 1);
    if (strpos(Utils::PROHIBITED_SYMBOLS, $ch) !== FALSE) {
      $ch = "_";
    }
    $newName = $newName . $ch;
  }
  return $newName;
}