mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Fix for images with special chars
closes #780 - added replacing of special chars with '_'
This commit is contained in:
parent
56620635db
commit
60d93bd3f3
@ -78,7 +78,7 @@ adminControllers = {
|
||||
tmp_path = req.files.uploadimage.path,
|
||||
dir = path.join('content/images', year, month),
|
||||
ext = path.extname(req.files.uploadimage.name).toLowerCase(),
|
||||
basename = path.basename(req.files.uploadimage.name, ext);
|
||||
basename = path.basename(req.files.uploadimage.name, ext).replace(/[\W]/gi, '_');
|
||||
|
||||
function renameFile(target_path) {
|
||||
// adds directories recursively
|
||||
|
Loading…
Reference in New Issue
Block a user