0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Merge pull request #801 from sebgie/issue#780

Fix for images with special chars
This commit is contained in:
Hannah Wolfe 2013-09-17 14:34:00 -07:00
commit 3a852b8dbb

View file

@ -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