From c5b71af99c40f4ead1384cf6f85e4d052000484a Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Tue, 4 Apr 2017 09:10:06 -0400 Subject: [PATCH] RIFT-16086, 16089, support folder names with spaces Signed-off-by: Laurence Maultsby --- .../composer/src/src/components/filemanager/FileManager.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx index 498cd2aec..ed9ea93a5 100644 --- a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx +++ b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx @@ -132,7 +132,7 @@ function buildList(self, data) { function contentFolder(context, folder, path, key, inputState, updateFn, sendDownloadFileRequst, deleteFn) { let type = context.props.type; let id = context.props.item.id; - let classId = `DZ-${path.replace(/\//g, '-')}`; + let classId = `DZ-${path.replace(/\/|\s+/g, '-')}`; const onboardDropZone = createDropZone.bind(this, FileManagerUploadDropZone.ACTIONS.onboard, '.ComposerAppAddFile.' + classId, type, id, path); return ( @@ -171,7 +171,7 @@ class ItemUpload extends React.Component { } render() { let {type, id, path, key, ...props} = this.props; - let classId = `DZ-${path.replace(/\//g, '-')}`; + let classId = `DZ-${path.replace(/\/|\s+/g, '-')}`; return (