Skip to content

Commit

Permalink
added special characters replacement when uploading an image
Browse files Browse the repository at this point in the history
mattchete committed Jul 12, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 1f92d65 commit 7cf09e7
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions lib/KCFinderBundle/kcfinder/config.php
Original file line number Diff line number Diff line change
@@ -86,10 +86,46 @@
'image' => "*img",
),

'filenameChangeChars' => array(/*
' ' => "_",
':' => "."
*/),
'filenameChangeChars' => array(
' ' => '_',
':' => '-',
'/' => '-',
'\'' => '-',
'' => '-',
'"' => '-',

'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'Ae',
'Ç'=>'C',
'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E',
'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I',
'Ð'=>'Dj',
'Ñ'=>'N',
'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O',
'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U',
'Ý'=>'Y',
'Þ'=>'B',
'ß'=>'Ss',
'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'ae',
'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e',
'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i',
'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o',
'ù'=>'u', 'ú'=>'u', 'û'=>'u',
'ý'=>'y',
'þ'=>'b',
'ÿ'=>'y',
'Š'=>'S', 'š'=>'s', 'ś' => 's',
'Ž'=>'Z', 'ž'=>'z',
'ƒ'=>'f',

'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',
'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',
'à'=>'a', ''=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', ''=>'e', ''=>'e',
'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',
'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',
'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r',
),

'dirnameChangeChars' => array(/*
' ' => "_",

0 comments on commit 7cf09e7

Please sign in to comment.