Disable char , (comma) in file name -ref #6785

1.9.x
Hubert Borderiou 12 years ago
parent 30baa70c51
commit 57b91f3158
  1. 4
      main/inc/lib/main_api.lib.php

@ -4904,8 +4904,8 @@ function api_is_element_in_the_session($tool, $element_id, $session_id = null) {
function replace_dangerous_char($filename, $strict = 'loose') {
// Safe replacements for some non-letter characters.
static $search = array("\0", ' ', "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%');
static $replace = array('', '_', '_', '_', '_', '_', '-', '-', '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-');
static $search = array(',', "\0", ' ', "\t", "\n", "\r", "\x0B", '/', "\\", '"', "'", '?', '*', '>', '<', '|', ':', '$', '(', ')', '^', '[', ']', '#', '+', '&', '%');
static $replace = array('_', '', '_', '_', '_', '_', '_', '-', '-', '-', '_', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-');
// Encoding detection.
$encoding = api_detect_encoding($filename);

Loading…
Cancel
Save